代码之家  ›  专栏  ›  技术社区  ›  TJ1

如何找到一个国家的悲哀

  •  3
  • TJ1  · 技术社区  · 12 年前

    我正在尝试测试Twitter API,寻找一个国家的趋势。 我如何找到特定国家的WOEID(地球上的位置标识符)? 我试着在谷歌上查找,但找不到列表。

    如果Python中有任何程序提供WOEID,那也很好。

    1 回复  |  直到 12 年前
        1
  •  8
  •   Matthew Trevor    12 年前

    这个 yweather 包提供了一种实现这一点的方法:

    >>> import yweather
    >>> client = yweather.Client()
    >>> client.fetch_woeid('Australia')
    '23424748'