diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-08-08 05:37:38 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-08-08 05:37:38 +0600 |
commit | 428e4e4a850df81031e8267dddf759da605639e3 (patch) | |
tree | daae9f5c2285c4bc4328571243b99e840f1927dc /youtube_dl/extractor/periscope.py | |
parent | 1e83741c9a5d67e8bbe65510d41b558361496fe8 (diff) |
[quickscope] Add extractor
Diffstat (limited to 'youtube_dl/extractor/periscope.py')
-rw-r--r-- | youtube_dl/extractor/periscope.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/youtube_dl/extractor/periscope.py b/youtube_dl/extractor/periscope.py index de53b752d..578b53a24 100644 --- a/youtube_dl/extractor/periscope.py +++ b/youtube_dl/extractor/periscope.py @@ -76,3 +76,24 @@ class PeriscopeIE(InfoExtractor): 'thumbnails': thumbnails, 'formats': formats, } + + +class QuickscopeIE(InfoExtractor): + IE_DESC = 'Quisck Scope' + _VALID_URL = r'https?://watchonperiscope\.com/broadcast/(?P<id>\d+)' + _TEST = { + 'url': 'https://watchonperiscope.com/broadcast/56180087', + 'only_matching': True, + } + + def _real_extract(self, url): + broadcast_id = self._match_id(url) + request = compat_urllib_request.Request( + 'https://watchonperiscope.com/api/accessChannel', compat_urllib_parse.urlencode({ + 'broadcast_id': broadcast_id, + 'entry_ticket': '', + 'from_push': 'false', + 'uses_sessions': 'true', + }).encode('utf-8')) + return self.url_result( + self._download_json(request, broadcast_id)['share_url'], 'Periscope') |