абузы: extract промокодов/сумм/ссылок в API и панели, +16 проверенных источников (TG/reddit/discourse/RSS/github/HN), чистка HTML в деталях, клэмп days
This commit is contained in:
16
tools/shot_abuse.py
Normal file
16
tools/shot_abuse.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""Скриншот вкладки «Абузы» панели omni-parse."""
|
||||
import sys
|
||||
from camoufox.sync_api import Camoufox
|
||||
|
||||
OUT = sys.argv[1] if len(sys.argv) > 1 else "data/dash_abuse.png"
|
||||
URL = "http://127.0.0.1:8078/#/abuse"
|
||||
|
||||
with Camoufox(headless=True, geoip=False, humanize=True) as b:
|
||||
p = b.new_page(viewport={"width": 1400, "height": 1000})
|
||||
p.goto(URL, wait_until="domcontentloaded", timeout=60000)
|
||||
p.wait_for_selector("#view", timeout=60000)
|
||||
p.wait_for_timeout(7000)
|
||||
txt = p.inner_text("#view")[:900]
|
||||
p.screenshot(path=OUT, full_page=False)
|
||||
print(txt)
|
||||
print("--- saved:", OUT)
|
||||
Reference in New Issue
Block a user