16 lines
622 B
Python
16 lines
622 B
Python
"""Скриншот вкладки «Абузы» панели 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) |