1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

tv4play: show a warning about all episodes on video or clip page

This commit is contained in:
Johan Andersson 2023-10-09 00:58:44 +02:00
parent 092fe37220
commit 48535691c5

View File

@ -3,6 +3,7 @@
import json
import logging
import re
from urllib.parse import urlparse
from svtplay_dl.error import ServiceError
from svtplay_dl.fetcher.dash import dashparse
@ -110,6 +111,11 @@ class Tv4play(Service, OpenGraphThumbMixin):
episodes = []
items = []
parse = urlparse(self.url)
if parse.path.startswith("/klipp") or parse.path.startswith("/video"):
logging.warning("Use program page instead of the clip / video page.")
return episodes
token = self._login()
if token is None:
logging.error("You need username / password.")