mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
[periscope] Add support for videos with broadcast_id (Closes #7359)
This commit is contained in:
parent
f93ded9852
commit
b15c44cd36
|
@ -27,9 +27,10 @@ class PeriscopeIE(InfoExtractor):
|
||||||
'skip': 'Expires in 24 hours',
|
'skip': 'Expires in 24 hours',
|
||||||
}
|
}
|
||||||
|
|
||||||
def _call_api(self, method, token):
|
def _call_api(self, method, value):
|
||||||
|
attribute = 'token' if len(value) > 13 else 'broadcast_id'
|
||||||
return self._download_json(
|
return self._download_json(
|
||||||
'https://api.periscope.tv/api/v2/%s?token=%s' % (method, token), token)
|
'https://api.periscope.tv/api/v2/%s?%s=%s' % (method, attribute, value), value)
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
token = self._match_id(url)
|
token = self._match_id(url)
|
||||||
|
|
Loading…
Reference in a new issue