Files
wiki/playwright/app.py
2024-08-11 14:01:10 +09:00

16 lines
622 B
Python

# pip install playwright && playwright install --with-deps
import asyncio, threading, queue, io, pandas as pd
from playwright.async_api import async_playwright
def GET(url, html = queue.Queue()):
async def aGET(P = async_playwright().start()):
html.put(await (await (await (await (await P)
.chromium.launch()).new_page()).goto(url)).text())
threading.Thread(target=lambda: asyncio.run(aGET())).start()
return io.StringIO(html.get())
df = pd.read_html(GET('https://freeproxy.world/?type=socks5'))[0]
df = df.loc[df.Type == 'socks5'].reset_index(drop=True)
print(f'\x1b[92m{df}\x1b[0m')