This project aims to provide a suite of scripts to retrieve ips by country.
When available you can also get IPs used by a specific ISP.
- Get all IPs from France:
python query.py --country fr
- Get all IPs from Online in France:
python query.py --country fr --search online
The code has been tested with Python 3 and it depends on Scrapy. It is not a necessary step: all the stuff is already committed.
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
Now, you can get fresh data by running Scrapy.
- The first script fetches IPs in the CSV format (
raw
directory). - The second one generates a binary
ips-by-country.p
) with all the data. - It builds the markdown pages for each country (
countries
directory).
scrapy runspider --nolog ip_spider.py
python parse.py