Merge branch 'master' of https://git.yauk.tv/jay817/wiki
This commit is contained in:
15
playwright/app.py
Normal file
15
playwright/app.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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')
|
||||
Reference in New Issue
Block a user