-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexample.py
More file actions
46 lines (37 loc) · 1011 Bytes
/
example.py
File metadata and controls
46 lines (37 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'''
(Once the package is published)
pip install random-proxies
or
Follow example usage to import the package
'''
from random_proxies import random_proxy
'''
Fetch directly from free-proxy-list.net
:param use_cache: Boolean value to fetch from cache_server or not (default: True)
:return: returns `ip:port`
:rtype: str
'''
random_proxy(use_cache=False)
'''
Fetch by protocol name.
:param protocol: Protocol name, either http, https or socks (default: http)
:return: returns `ip:port`
:rtype: str
'''
random_proxy(protocol='https')
'''
Fetch by country name or code.
:param country: Country name (default: None)
:param code: Country code, should match with country name if added (default: None)
:return: returns `ip:port`
:rtype: str
'''
random_proxy(country='india')
random_proxy(code='in')
'''
Fetch by proxy standard.
:param standard: Proxy standard, either anonymous, elite proxy, transparent (default: anonymous)
:return: returns `ip:port`
:rtype: str
'''
random_proxy(standard='elite proxy')