Skip to content

florenthemmi/ips-by-country

Repository files navigation

IPs by country

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.

Usage

  • Get all IPs from France: python query.py --country fr
  • Get all IPs from Online in France: python query.py --country fr --search online

Install environment and fetch the data (optional)

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.

  1. The first script fetches IPs in the CSV format (raw directory).
  2. The second one generates a binary ips-by-country.p) with all the data.
  3. It builds the markdown pages for each country (countries directory).
scrapy runspider --nolog ip_spider.py
python parse.py

Releases

No releases published

Packages

No packages published

Languages