mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
picsearch: better error messages
This commit is contained in:
parent
0046d05987
commit
05972c7b43
@ -18,11 +18,11 @@ class Picsearch(Service, OpenGraphThumbMixin):
|
||||
data = self.get_urldata()
|
||||
ajax_auth = re.search(r"picsearch_ajax_auth = '(\w+)'", data)
|
||||
if not ajax_auth:
|
||||
print "hej"
|
||||
log.error("Cant find token for video")
|
||||
sys.exit(2)
|
||||
mediaid = re.search(r"mediaId = '(\w+)';", data)
|
||||
if not mediaid:
|
||||
print "didi"
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user