iplocalize
Straight forward python3 library to test (quickly) and locate a bunch of free-proxy IP.
Installation
pip install iplocalize
Python module
import iplocalize as ip
locator = ip.IPLoc()
locator.threaded_localize([['1.2.3.4', '1111'], ['5.6.7.8', '2222'], ...],
'path/to/geolite2-city.mmdb')
> > > { ip: '1.2.3.4:1111', cc: 'RU', time: 1.492218 }
IPLoc class will accept several parameters :
test_url: the URL the proxy will be tested upon (http200, and faster than timeout)timeout: timeout (directly passed to requests, the actual request might be longer than timeout)threads: number of concurrent jobs
threaded_localize needs 2 parameters:
- a list of
['ip', 'port']lists geolite_file: path to your copy of Geolite2-city.mmdb (https://www.maxmind.com)
The default value for threads is 100, it might sound huge, but it gave me pretty good results, feel free to tweak it to your needs.
You can call localize directly with:
- a single
['ip', 'port']structure - a
Reader()object (cf. GeoIP2 module documentation)
Command line
Just run : iplocalize --help
Nothing fun or complicated.
Disclaimer
Geolocation is provided through Geolite mmdb files, they have a free version available through their website.
Release files for iplocalize 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iplocalize-0.0.2.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iplocalize-0.0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / iplocalize-0.0.2.tar.gz
| Download URL | iplocalize-0.0.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3aff7287f4598254072285ac352595a29f1dbddefeb0b6fac32928aa72b58d3
|
|
BLAKE2b-256 checksum How to use checksums |
b055ada4739ddcca1a8d94af07c6d49916fd3750f1acd2d497647dcbf812d840
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Release files / iplocalize-0.0.2-py2.py3-none-any.whl
| Download URL | iplocalize-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
15cf2afcaa14bb2b80decf855489c23b79f7e188bd541b777e45ff727add57cf
|
|
BLAKE2b-256 checksum How to use checksums |
c6a9832c5babfa86c928b70c4e8924d5f386cf80ab4572d9657f0358918003cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|