aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/periscope.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-05 02:51:30 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-05 02:51:30 +0600
commitb15c44cd36831f175e9dd4081b82beb8075790b3 (patch)
tree30896d29efd7bc620c3754100508f6c16596ad31 /youtube_dl/extractor/periscope.py
parentf93ded98522cc1272a8d2210738937132292afc9 (diff)
[periscope] Add support for videos with broadcast_id (Closes #7359)
Diffstat (limited to 'youtube_dl/extractor/periscope.py')
-rw-r--r--youtube_dl/extractor/periscope.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/periscope.py b/youtube_dl/extractor/periscope.py
index 8ad936758..0f9d7576f 100644
--- a/youtube_dl/extractor/periscope.py
+++ b/youtube_dl/extractor/periscope.py
@@ -27,9 +27,10 @@ class PeriscopeIE(InfoExtractor):
'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(
- '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):
token = self._match_id(url)