# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- import copy import datetime import hashlib import json import logging import re import time from urllib.parse import parse_qs from urllib.parse import urljoin from urllib.parse import urlparse from svtplay_dl.error import ServiceError from svtplay_dl.fetcher.dash import dashparse from svtplay_dl.fetcher.hls import hlsparse from svtplay_dl.service import MetadataThumbMixin from svtplay_dl.service import Service from svtplay_dl.subtitle import subtitle from svtplay_dl.utils.text import filenamify URL_VIDEO_API = "https://api.svt.se/video/" LIVE_CHANNELS = { "svtbarn": "ch-barnkanalen", "svt1": "ch-svt1", "svt2": "ch-svt2", "svt24": "ch-svt24", "kunskapskanalen": "ch-kunskapskanalen", } class Svtplay(Service, MetadataThumbMixin): supported_domains = ["svtplay.se", "svt.se", "beta.svtplay.se", "svtflow.se"] info_search_expr = r"