33 lines
1.3 KiB
Python
33 lines
1.3 KiB
Python
|
|
from playwright.sync_api import sync_playwright
|
|
import re
|
|
|
|
with sync_playwright() as p:
|
|
browser = p.chromium.launch(headless=True, args=["--no-sandbox"])
|
|
ctx = browser.new_context(viewport={"width":1440,"height":900})
|
|
page = ctx.new_page()
|
|
|
|
pages = [
|
|
("Home", "https://weval-consulting.com/"),
|
|
("Products", "https://weval-consulting.com/products/"),
|
|
("ReachHCP", "https://weval-consulting.com/products/reachhcp.html"),
|
|
("Suite Enterprise", "https://weval-consulting.com/solutions/wevia-enterprise.html"),
|
|
("Marketplace", "https://weval-consulting.com/marketplace"),
|
|
("Business KPI V83", "https://weval-consulting.com/business-kpi-dashboard.php"),
|
|
("WEVIA chat page", "https://weval-consulting.com/wevia-master.html"),
|
|
]
|
|
|
|
print(f"{'Page':<28} {'code':>5} {'size':>8}")
|
|
print("-"*55)
|
|
for name, url in pages:
|
|
try:
|
|
resp = page.goto(url + "?cb=b12f5", wait_until="networkidle", timeout=15000)
|
|
code = resp.status if resp else 0
|
|
size = len(page.content())
|
|
print(f"{name:<28} {code:>5} {size:>8}")
|
|
except Exception as e:
|
|
print(f"{name:<28} ERR {str(e)[:25]}")
|
|
|
|
browser.close()
|
|
print("\\nZERO REGRESSION CHECK DONE")
|