repl.it
@notbehind_you/

ProxyBroker gen.

Python

Generate proxybroker proxies

fork
loading
Files
  • main.py
  • Packager files
  • requirements.txt
main.py
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
import asyncio,os
os.system("pip install proxybroker")
from proxybroker import Broker

class proxyy:
	pxy = ''

def get_proxy():
	proxies = asyncio.Queue()
	broker = Broker(proxies)
	tasks = asyncio.gather(
		broker.find(types=['HTTP'], limit=10),
		show(proxies))
	loop = asyncio.get_event_loop()
	loop.run_until_complete(tasks)

async def show(proxies):
	while True:
		proxy = await proxies.get()
		if proxy is None: break
		proxy = str(proxy)
		proxy = proxy.split('] ')
		proxy.pop(0)
		x = proxy.pop(0)
		x = x [:-1]
		proxyy.pxy = x

get_proxy()
print (proxyy.pxy)
Fetching token
?