Skip to main content

Proxy scraper for further use

Project description

Free-proxy

Get free working proxy from https://www.sslproxies.org/ and use it in your script

FreeProxy class scrapes proxies from https://www.sslproxies.org/ and checkes if proxy is working. There is posibility to
filter proxies by country and acceptable timeout. You can also randomize list of proxies from where script would get
first working proxy.

You can use it in sending request through custom proxy, with selenium or wherever you want.

Returns proxy as string:

'113.160.218.14:8888'  

Requirements

  • Python3

  • Request library

  • Lxml library

Installation

pip install free-proxy

asciicast

Usage with examples

First import Free Proxy that way:

from fp.fp import FreeProxy

Options

Parameter Type Example Default value
country_id list ['US', 'BR'] None
timeout float > 0 0.1 0.5
rand bool True False
proxy = FreeProxy().get()  
  • country_id parameter
    Get first working proxy from specified list of countries. If there is no valid proxy from specified list check all countries
proxy = FreeProxy(country_id=['US', 'BR']).get()  
  • timeout parameter
    Timeout is parameter for checking if proxy is valid. If test site doesn't respond in specified time
    script marks this proxy as invalid. Default timeout=0.5. You can change it by defining
    specified timeout eg. timeout=1.
proxy = FreeProxt(timeout=1).get()  
  • rand parameter
proxy = FreeProxy(rand=True).get()  

Shuffles proxy list from https://www.sslproxies.org/. Default rand=False and searches for working proxy from newest to oldest (as they are listed in https://www.sslproxies.org/).

You can combine parameters:

proxy = FreeProxy(country_id=['US', 'BR'], timeout=0.3, rand=True).get()  

If there is no working proxy script returns None

#Changelog

[1.0.1] - 2020-03-19

Changed

  • Fix typos in readme
  • Fix urrlib3 exception urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None,
  • Fix imports

License

MIT

Free Software!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

free_proxy-1.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

free_proxy-1.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file free_proxy-1.0.1.tar.gz.

File metadata

  • Download URL: free_proxy-1.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.7

File hashes

Hashes for free_proxy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2ede8f35e3710c748dcb25eced8f193a5c8a072b1c3cab26acdb52038bb92692
MD5 482143674066ae88004b5b61b27747e6
BLAKE2b-256 13e0c5cb90a577f87832eeed730ddd74c7634cf6c92e315d302e21ccd0cae270

See more details on using hashes here.

File details

Details for the file free_proxy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: free_proxy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.7

File hashes

Hashes for free_proxy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 557283bc19e9ae904e3123e4e409544eb78f30350bf9de22f28ad89d060a104d
MD5 697a1eb8d2223357833550c53c0459d4
BLAKE2b-256 7c3ab40a5537022ca9afb2630bad04efb8d9ba722c5d137e2a9f0c77b095a30a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page