
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
wikigeocode
Advanced tools
Simple utility to geocode an administrative location using the wikimedia APIs.
This tiny module performs the geocode of an administrative location (town, city, county, state, country, etc) using the wikimedia APIs, returning the wikipedia page title and the lat, lon coordinates if available, caching the results for an hour. For example:
> const {fetchSearchGeo} = require('wikigeocode')
> fetchSearchGeo('bogota').then(x => console.log(x))
> { pageid: 211271,
ns: 0,
title: 'Bogotá',
coordinates:
[ { lat: 4.71111111,
lon: -74.07222222,
primary: '',
globe: 'earth' } ] }
The module only has an external node-fetch dependency to query the wikimedia APIs and Jest as dev dependency to run the tests.
You can install with [npm]:
$ npm install --save wikigeocode
The module provides two main functions: fetchGeo
to get the coordinates property from a wikipedia geographical entry and fetchExtract
to get the summary (extract) of that particular page:
> const {fetchGeo, fetchExtra} = require('wikigeocode')
> fetchGeo('dublin').then(x => console.log(x))
> { pageid: 8504,
ns: 0,
title: 'Dublin',
coordinates: [ { lat: 53.35, lon: -6.26666667, primary: '', globe: 'earth' } ] }
> fetchExtract('dublin').then(x => console.log(x))
>{ pageid: 8504,
ns: 0,
title: 'Dublin',
extract: 'Dublin (; Irish: Baile Átha Cliath [ˈbˠalʲə aːhə ˈclʲiə; ˌbʲlʲaː ˈclʲiə]) is the capital of, and largest city in, Ireland ... '}
The previous two functions require the exact wikipedia page title. If you don't know the exact entry, you can use fetchSearchGeo
and fetchSearchExtract
to get the closest match to your query:
> const {fetchSearchGeo, fetchSearchExtra} = require('wikigeocode')
> fetchSearchGeo('londonderry').then(x => console.log(x))
> { pageid: 9055,
ns: 0,
title: 'Derry',
coordinates: [ { lat: 54.9958, lon: -7.3074, primary: '', globe: 'earth' } ] }
> fetchSearchExtract('londonderry').then(x => console.log(x))
>{ pageid: 9055,
ns: 0,
title: 'Derry',
extract: 'Derry, officially Londonderry (), is the second-largest city in Northern Ireland and the fourth-largest city on the island of Ireland. ...'}
Copyright © 2019, Juan Convers. Released under the MIT License.
FAQs
Simple utility to geocode an administrative location using the wikimedia APIs.
The npm package wikigeocode receives a total of 0 weekly downloads. As such, wikigeocode popularity was classified as not popular.
We found that wikigeocode 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.