403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /tmp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tmp//ep_scrape.py
import json, sys
from playwright.sync_api import sync_playwright

SHIPS = {
    "AIDAdiva": "18938",
    "AIDAmar": "18935",
    "Mein Schiff 7": "18945",
    "MSC Magnifica": "23163",
}
YEAR = "2027"

def opt_texts(page, sel):
    return page.eval_on_selector_all(
        f"{sel} option",
        "els => els.map(e => ({v: e.value, t: e.textContent.trim()}))"
    )

out = {}
with sync_playwright() as p:
    b = p.chromium.launch(headless=True)
    pg = b.new_page()
    pg.set_default_timeout(45000)
    pg.goto("https://www.easy-parken.de/buchen/", wait_until="domcontentloaded")
    pg.wait_for_selector("#year", timeout=45000)
    for name, sid in SHIPS.items():
        try:
            pg.select_option("#year", YEAR)
            pg.wait_for_timeout(2500)
            pg.select_option("#ship", sid)
            pg.wait_for_timeout(3500)
            dates = opt_texts(pg, "#date")
            out[name] = [d["t"] for d in dates if d["v"] and "." in d["t"]]
        except Exception as e:
            out[name] = ["ERR: " + str(e)]
    b.close()

print(json.dumps(out, ensure_ascii=False, indent=2))

Youez - 2016 - github.com/yon3zu
LinuXploit