mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 15:14:14 +01:00
tv4play: some fixes for tv4.se
In some cases we dont have vid in the url
This commit is contained in:
parent
b7b50b101f
commit
8e547f436d
@ -910,8 +910,13 @@ class Tv4play():
|
|||||||
if match:
|
if match:
|
||||||
vid = match.group(1)
|
vid = match.group(1)
|
||||||
else:
|
else:
|
||||||
log.error("Can't find video file")
|
data = get_http_data(url)
|
||||||
sys.exit(2)
|
match = re.search("\"vid\":\"(\d+)\",", data)
|
||||||
|
if match:
|
||||||
|
vid = match.group(1)
|
||||||
|
else:
|
||||||
|
log.error("Can't find video file")
|
||||||
|
sys.exit(2)
|
||||||
|
|
||||||
url = "http://premium.tv4play.se/api/web/asset/%s/play" % vid
|
url = "http://premium.tv4play.se/api/web/asset/%s/play" % vid
|
||||||
data = get_http_data(url)
|
data = get_http_data(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user