【发布时间】:2014-05-20 13:47:54
【问题描述】:
我正在尝试测试 Twitter API 并找出某个国家/地区的趋势。 如何找到特定国家/地区的 WOEID(WHERE ON EARTH IDENTIFIER)? 我尝试在 Google 上查找,但找不到列表。
如果 Python 中有任何提供 WOEID 的程序也可以。
【问题讨论】:
-
你见过it!
我正在尝试测试 Twitter API 并找出某个国家/地区的趋势。 如何找到特定国家/地区的 WOEID(WHERE ON EARTH IDENTIFIER)? 我尝试在 Google 上查找,但找不到列表。
如果 Python 中有任何提供 WOEID 的程序也可以。
【问题讨论】:
yweather 包提供了一种方法:
>>> import yweather
>>> client = yweather.Client()
>>> client.fetch_woeid('Australia')
'23424748'
【讨论】:
HTTP Error 502: Cannot find server.
As of Thursday, Jan. 3, 2019, the weather.yahooapis.com and query.yahooapis.com for Yahoo Weather API will be retired.