mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 12:15:40 +01:00
picsearch: They have two ways to write mediaId and media-id.
this fixes #94
This commit is contained in:
parent
8290cefc80
commit
d2068050b4
@ -19,10 +19,12 @@ class Picsearch(Service, OpenGraphThumbMixin):
|
||||
if not ajax_auth:
|
||||
log.error("Cant find token for video")
|
||||
sys.exit(2)
|
||||
mediaid = re.search(r"mediaId = '(\w+)';", data)
|
||||
mediaid = re.search(r"mediaId = '([^']+)';", data)
|
||||
if not mediaid:
|
||||
log.error("Cant find media id")
|
||||
sys.exit(2)
|
||||
mediaid = re.search(r'media-id="([^"]+)"', data)
|
||||
if not mediaid:
|
||||
log.error("Cant find media id")
|
||||
sys.exit(2)
|
||||
jsondata = get_http_data("http://csp.picsearch.com/rest?jsonp=&eventParam=1&auth=%s&method=embed&mediaid=%s" % (ajax_auth.group(1), mediaid.group(1)))
|
||||
jsondata = json.loads(jsondata)
|
||||
files = jsondata["media"]["playerconfig"]["playlist"][1]["bitrates"]
|
||||
|
Loading…
Reference in New Issue
Block a user