diff --git a/lib/svtplay_dl/service/picsearch.py b/lib/svtplay_dl/service/picsearch.py index 7727b8d..0df5451 100644 --- a/lib/svtplay_dl/service/picsearch.py +++ b/lib/svtplay_dl/service/picsearch.py @@ -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"]