正常天气输出pyowm天气?

时间:2018-02-23 17:22:22

标签: python string text openweathermap

无法在pyowm git上找到任何信息 使用pyowm时,我使用print(weather.get_weather())等等。 可悲的是输出看起来像这样,但我并不感到惊讶:

<pyowm.webapi25.weather.Weather - reference time=2018-02-23 16:55:00+00, status=Rain>

非常丑陋。 我正在寻找一种方法来删除所有无用的东西,并在status=之后保留这个词,现在看来是Rain。

我知道fileNameOnly = start[:start.find(ext) + len(ext)]之类的内容会保留所有内容,直到ext中声明的指定字符为止,所以我需要一种相反的方法。

0 个答案:

没有答案