| 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 : /proc/3951574/root/tmp/ |
Upload File : |
import re, sys
from playwright.sync_api import sync_playwright
cookies = []
for line in open('/tmp/cj_ma.txt'):
if line.startswith('#') or not line.strip():
continue
p = line.strip().split('\t')
if len(p) >= 7:
cookies.append({'name': p[5], 'value': p[6], 'domain': p[0].lstrip('.'), 'path': p[2]})
with sync_playwright() as pw:
b = pw.chromium.launch()
ctx = b.new_context()
ctx.add_cookies(cookies)
pg = ctx.new_page()
pg.goto('https://seaside.pacim.de/tasks/day/', wait_until='networkidle')
# open Mobile Zugänge tab if present
try:
pg.click('a[href="#tab-mobileaccess"], a:has-text("Mobile Zugänge")', timeout=4000)
except Exception as e:
print("tab click:", e)
pg.wait_for_timeout(800)
def state():
return pg.evaluate('''() => {
const t = document.querySelector('.ma-col[value="type"]');
const parks = Array.from(document.querySelectorAll('.ma-park'));
return t ? {disabled: t.disabled, checked: t.checked,
opacity: (t.closest('.ma-check')||{}).style ? t.closest('.ma-check').style.opacity : '',
parks: parks.filter(p=>p.checked).length} : null;
}''')
print("initial (all parking):", state())
# uncheck two parking -> leave 1
pg.evaluate('''() => {
const ps = document.querySelectorAll('.ma-park');
ps[1].checked=false; ps[1].dispatchEvent(new Event('change',{bubbles:true}));
ps[2].checked=false; ps[2].dispatchEvent(new Event('change',{bubbles:true}));
}''')
pg.wait_for_timeout(200)
print("after -> 1 parking:", state())
# re-check one -> 2 parking
pg.evaluate('''() => {
const ps = document.querySelectorAll('.ma-park');
ps[1].checked=true; ps[1].dispatchEvent(new Event('change',{bubbles:true}));
}''')
pg.wait_for_timeout(200)
print("after -> 2 parking:", state())
b.close()