1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

generic: better way to detect embedded svtplay

This commit is contained in:
Johan Andersson 2014-12-22 10:39:51 +01:00
parent ef3890d9ec
commit dd67734fb4

View File

@ -151,13 +151,13 @@ class Generic(object):
error, data = get_http_data(url)
if error:
return
match = re.search(r"src=\"(http://www.svt.se/wd.*)\" height", data)
match = re.search(r"src=(\"|\')(http://www.svt.se/wd[^\'\"]+)(\"|\')", data)
stream = None
if match:
url = match.group(1)
url = match.group(2)
for i in sites:
if i.handles(url):
url = url.replace("&", "&")
url = url.replace("&", "&").replace("&","&")
return url, i(url)
match = re.search(r"src=\"(http://player.vimeo.com/video/[0-9]+)\" ", data)