
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
twitter-woeid
Advanced tools
Get WOEID for locations that Twitter has trending topic information for.
Twitter uses Yahoo! WOEID for all of their Trends related API endpoints. But that Yahoo! service has been shutdown.
This NPM module offers methods to get WOEID of all locations that Twitter has trending topic information for.
getSingleWOEID(cityName)
Use the above method for getting the WOEID of a City (Local Trends).
Use the above method for getting the WOEID of a Country (National Trends).
getAllWOEID(countryName)
Use the above method for getting the WOEIDs of all cities (that Twitter has trending topic information for) of that country.
Each of the above methods returns an array of matching city/country.
console.log(getSingleWOEID('new york'));
// RETURNS
[{ name: 'New York', country: 'United States', woeid: 2459115 }];
console.log(getSingleWOEID('india'));
// RETURNS
[{ name: 'India', country: 'India', woeid: 23424848 }];
console.log(getAllWOEID('japan'));
// RETURNS
[
{ name: 'Kitakyushu', country: 'Japan', woeid: 1110809 },
{ name: 'Saitama', country: 'Japan', woeid: 1116753 },
...
{ name: 'Okayama', country: 'Japan', woeid: 90036018 },
];
Using destructuring
const [{ woeid }] = getSingleWOEID('chennai');
twit.get('trends/place', { id: woeid })
.then(res => console.log(res.data[0]))
.catch(e => console.log(e));
FAQs
Get WOEID for locations that Twitter has trending topic information for.
The npm package twitter-woeid receives a total of 0 weekly downloads. As such, twitter-woeid popularity was classified as not popular.
We found that twitter-woeid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.