Skip to content

Python library with C module for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.

License

Notifications You must be signed in to change notification settings

ip2location/ip2proxy-python-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP2Proxy-Python-C

This library allows user to query an IP address if it was being used as VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges, residential proxies, consumer privacy networks, and enterprise private networks. It lookup the proxy IP address from IP2Proxy BIN Data file. This data file can be downloaded at

This library required the IP2Proxy C Library to work. You can install it from here.

Methods

Below are the methods supported in this library.

Method Name Description
open Open the IP2Proxy BIN data with the help of IP2Proxy C Library.
close Close and clean up the file pointer.
get_package_version Get the package version (1 to 8 for PX1 to PX8 respectively).
get_module_version Get the module version.
get_database_version Get the database version.
is_proxy Check whether if an IP address was a proxy. Returned value:
  • -1 : errors
  • 0 : not a proxy
  • 1 : a proxy
  • 2 : a data center IP address
get_all Return the proxy information in array.
get_proxy_type Return the proxy type. Please visit IP2Location for the list of proxy types supported
get_country_short Return the ISO3166-1 country code (2-digits) of the proxy.
get_country_long Return the ISO3166-1 country name of the proxy.
get_region Return the ISO3166-2 region name of the proxy. Please visit ISO3166-2 Subdivision Code for the information of ISO3166-2 supported
get_city Return the city name of the proxy.
get_isp Return the ISP name of the proxy.
get_domain Return the internet domain name associated with IP address range.
get_usage_type Return the usage type classification of ISP or company.
get_asn Return the autonomous system number (ASN).
get_as_name Return the autonomous system (AS) name.
get_last_seen Return the proxy last seen in days.
get_threat Return the threat types reported to proxy's IP address or domain name.
get_provider Returns the VPN service provider name if available.

Requirements

  1. Python 2.7 and above
  2. IP2Proxy C Library

Installation

  1. Unzip the package.
  2. Execute python setup.py build
  3. Executepython setup.py install

Testing

python sample.py

Reference

Usage Type

  • (COM) Commercial
  • (ORG) Organization
  • (GOV) Government
  • (MIL) Military
  • (EDU) University/College/School
  • (LIB) Library
  • (CDN) Content Delivery Network
  • (ISP) Fixed Line ISP
  • (MOB) Mobile ISP
  • (DCH) Data Center/Web Hosting/Transit
  • (SES) Search Engine Spider
  • (RSV) Reserved

Support

Email: support@ip2location.com. URL: https://www.ip2location.com

About

Python library with C module for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages