mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 08:54:33 +01:00
[quickscope] Add extractor
This commit is contained in:
parent
1e83741c9a
commit
428e4e4a85
@ -432,7 +432,10 @@ from .orf import (
|
|||||||
from .parliamentliveuk import ParliamentLiveUKIE
|
from .parliamentliveuk import ParliamentLiveUKIE
|
||||||
from .patreon import PatreonIE
|
from .patreon import PatreonIE
|
||||||
from .pbs import PBSIE
|
from .pbs import PBSIE
|
||||||
from .periscope import PeriscopeIE
|
from .periscope import (
|
||||||
|
PeriscopeIE,
|
||||||
|
QuickscopeIE,
|
||||||
|
)
|
||||||
from .philharmoniedeparis import PhilharmonieDeParisIE
|
from .philharmoniedeparis import PhilharmonieDeParisIE
|
||||||
from .phoenix import PhoenixIE
|
from .phoenix import PhoenixIE
|
||||||
from .photobucket import PhotobucketIE
|
from .photobucket import PhotobucketIE
|
||||||
|
@ -76,3 +76,24 @@ class PeriscopeIE(InfoExtractor):
|
|||||||
'thumbnails': thumbnails,
|
'thumbnails': thumbnails,
|
||||||
'formats': formats,
|
'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')
|
||||||
|
Loading…
Reference in New Issue
Block a user