Skip to main content

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 checks if proxy is working. There is possibility 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:

'http://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
anonym bool True False
elite 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 = FreeProxy(timeout=1).get()
proxy = FreeProxy(rand=True).get()
  • anonym parameter Return only those proxies that are marked as anonymous. Defaults to anonym=False
proxy = FreeProxy(anonym=True).get()
  • elite parameter Return only those proxies that are marked as 'elite proxy'. Defaults to elite=False.
proxy = FreeProxy(elite=True).get()

Note that elite proxies is anonymous at the same time, thus anonym=True automatically when elite=True.

You can combine parameters:

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

If there is no working proxy script returns There are no working proxies at this time. message.

CHANGELOG


[1.0.5] - 2022-01-07

  • Added elite parameter
  • Add exception class and raise exception instead of system exit
  • Change lxml version to 4.6.5

[1.0.4] - 2021-11-13

  • Fix proxy list default length

[1.0.3] - 2021-08-18

  • Change XPatch due to SSL proxies page update
  • Change lxml version

[1.0.2] - 2020-09-03

  • Added anonym parameter

[1.0.1] - 2020-03-19

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

[1.0.0] - 2019-02-04

  • Initial release

License


MIT

Free Software!

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.5.tar.gz (4.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: free_proxy-1.0.5.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7

File hashes

Hashes for free_proxy-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ca8b9aa42c31db8b4fb4aa299c830cd094768cc2d88bee3d9a5422be68df4f8d
MD5 32379493d03fddbdd27f87fcb22b68e5
BLAKE2b-256 470e2a349a09ddbf7ee80c4c2c5286dfceebe8f5736a7563637cca471bd4a92c

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.0

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.6

1 file

This release

1.0.5 This release

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page