mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
svtplay: fix embedded videos on svt.se
This commit is contained in:
parent
8da9cab05b
commit
05a20520b0
@ -47,7 +47,11 @@ class Svtplay(Service, OpenGraphThumbMixin):
|
||||
self.options.live = data["live"]
|
||||
if old:
|
||||
params = {"output": "json"}
|
||||
try:
|
||||
dataj = self.http.request("get", self.url, params=params).json()
|
||||
except ValueError:
|
||||
dataj = data
|
||||
old = False
|
||||
else:
|
||||
dataj = data
|
||||
|
||||
@ -98,6 +102,9 @@ class Svtplay(Service, OpenGraphThumbMixin):
|
||||
return match.group(1)
|
||||
parse = urlparse(self.url)
|
||||
match = re.search("/video/([0-9]+)/", parse.path)
|
||||
if match:
|
||||
return match.group(1)
|
||||
match = re.search("data-video-id='([^']+)'", self.get_urldata())
|
||||
if match:
|
||||
return match.group(1)
|
||||
match = re.search("/videoEpisod-([^/]+)/", parse.path)
|
||||
|
Loading…
Reference in New Issue
Block a user