# -*- coding: utf-8 -*-
"""
ZDF Mediathek 5.0.3 – Bastelpingu Hotfix frontend
2026-08-16

The scraper itself lives in script.module.libzdf.
This frontend only provides the ZDF-specific configuration and starts it.
"""

from libzdf import libzdf

# libzdf 5.x reads these values during __init__, therefore they must be
# available on the class before creating the instance.
libzdf.apiVersion = 1
libzdf.baseApi = "https://api.zdf.de"
libzdf.userAgent = (
    "Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 "
    "(KHTML, like Gecko) Chrome/100.0 Mobile Safari/537.36 "
    "ZDFApp/5.13.2"
)

# New reachable token endpoint. libzdf 5.0.3 also contains a compatibility
# rewrite for installations still passing the historic cellular host.
libzdf.tokenUrl = "https://zdf-prod-futura.zdf.de/mediathekV2/token"

# Not used while tokenUrl is configured, but libzdf expects the attributes.
libzdf.API_CLIENT_ID = ""
libzdf.API_CLIENT_KEY = ""

# Channels used by the "Sender / Datum" menu.
libzdf.channels = ["ZDF", "ZDFneo", "ZDFinfo"]

o = libzdf()
o.action()
