mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Fix bug with vimeo
This commit is contained in:
parent
db0cf86866
commit
ca2de62e6f
@ -20,11 +20,20 @@ class Vimeo(Service, OpenGraphThumbMixin):
|
|||||||
yield ServiceError("Excluding video")
|
yield ServiceError("Excluding video")
|
||||||
return
|
return
|
||||||
|
|
||||||
match = re.search('data-config-url="([^"]+)" data-fallback-url', data)
|
match_cfg_url = re.search('data-config-url="([^"]+)" data-fallback-url', data)
|
||||||
if not match:
|
match_clip_page_cfg = re.search( r'vimeo\.clip_page_config\s*=\s*({.+?});', data)
|
||||||
|
|
||||||
|
if match_cfg_url:
|
||||||
|
player_url = match_cfg_url.group(1).replace("&", "&")
|
||||||
|
|
||||||
|
elif match_clip_page_cfg:
|
||||||
|
page_config = json.loads(match_clip_page_cfg.group(1))
|
||||||
|
player_url = page_config["player"]["config_url"]
|
||||||
|
|
||||||
|
else:
|
||||||
yield ServiceError("Can't find video file for: {0}".format(self.url))
|
yield ServiceError("Can't find video file for: {0}".format(self.url))
|
||||||
return
|
return
|
||||||
player_url = match.group(1).replace("&", "&")
|
|
||||||
player_data = self.http.request("get", player_url).text
|
player_data = self.http.request("get", player_url).text
|
||||||
|
|
||||||
if player_data:
|
if player_data:
|
||||||
|
Loading…
Reference in New Issue
Block a user