سؤال

I am trying to test Twitter API and find trends in a country. How can I find the WOEID (WHERE ON EARTH IDENTIFIER) for a specific country? I tried looking on Google but could not find a list.

If there is any program in Python that provides WOEID that is fine as well.

هل كانت مفيدة؟

المحلول

The yweather package provides a way of doing this:

>>> import yweather
>>> client = yweather.Client()
>>> client.fetch_woeid('Australia')
'23424748'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top