MCPcopy Create free account
hub / github.com/geekcomputers/Python / __call__

Method __call__

insta_monitering/insta_datafetcher.py:34–52  ·  view source on GitHub ↗
(self, function_to_call_for_appling_proxy)

Source from the content-addressed store, hash-verified

32 self._IP = random.choice(ipdata.split(","))
33
34 def __call__(self, function_to_call_for_appling_proxy):
35 SOCKS5_PROXY_HOST = self._IP
36 # default_socket = socket.socket
37 socks.set_default_proxy(
38 socks.SOCKS5,
39 SOCKS5_PROXY_HOST,
40 config.SOCKS5_PROXY_PORT,
41 True,
42 config.auth,
43 config.passcode,
44 )
45 socket.socket = socks.socksocket
46
47 def wrapper_function(url):
48 # this is used for applyting socks5 proxy over the request
49 return function_to_call_for_appling_proxy(url)
50
51 socks.set_default_proxy()
52 return wrapper_function
53
54
55async def dataprocess(htmldata):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected