before_code
stringlengths
14
465k
reviewer_comment
stringlengths
16
64.5k
after_code
stringlengths
9
467k
diff_context
stringlengths
0
97k
file_path
stringlengths
5
226
comment_line
int32
0
26
language
stringclasses
37 values
quality_score
float32
0.07
1
comment_type
stringclasses
9 values
comment_length
int32
16
64.5k
before_lines
int32
1
17.2k
after_lines
int32
1
12.1k
is_negative
bool
2 classes
pr_title
stringlengths
1
308
pr_number
int32
1
299k
repo_name
stringclasses
533 values
repo_stars
int64
321
419k
repo_language
stringclasses
27 values
reviewer_username
stringlengths
0
39
author_username
stringlengths
2
39
if not fatal: return msg = item.get('msg') if msg == 'Sorry, this content is not available in your country.': self.raise_geo_restricted(countries=self._GEO_COUNTRIES, metadata_available=True) self.raise_no_formats(msg, expected=True) ...
```suggestion 'thumbnail': traverse_obj(item, 'thumbnail', 'thumbnailM'), ``` etc
if not formats: if not fatal: return msg = item.get('msg') if msg == 'Sorry, this content is not available in your country.': self.raise_geo_restricted(countries=self._GEO_COUNTRIES, metadata_available=True) self.raise_no_formats(ms...
@@ -35,61 +60,82 @@ def _extract_item(self, item, fatal): r'^(\d+)p', res, 'resolution', default=None)), }) else: - formats.append({ - 'ext': 'mp3', - 'format_id': k, - 'tbr': i...
yt_dlp/extractor/zingmp3.py
26
Python
0.571
suggestion
96
51
51
false
Feat: update new version for zingmp3
2,889
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
msg = item.get('msg') if msg == 'Sorry, this content is not available in your country.': self.raise_geo_restricted(countries=self._GEO_COUNTRIES, metadata_available=True) self.raise_no_formats(msg, expected=True) self._sort_formats(formats) lyric = it...
```suggestion 'duration': int_or_none(item.get('duration'))), ```
msg = item.get('msg') if msg == 'Sorry, this content is not available in your country.': self.raise_geo_restricted(countries=self._GEO_COUNTRIES, metadata_available=True) self.raise_no_formats(msg, expected=True) self._sort_formats(formats) lyric = it...
@@ -34,62 +59,78 @@ def _extract_item(self, item, fatal): 'height': int_or_none(self._search_regex( r'^(\d+)p', res, 'resolution', default=None)), }) - else: - formats.append({ - 'ext': 'm...
yt_dlp/extractor/zingmp3.py
26
Python
0.571
suggestion
79
51
51
false
Feat: update new version for zingmp3
2,889
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
def _process_data(self, data, song_id, type_url): return self._extract_item(data, song_id, type_url, True) class ZingMp3AlbumIE(ZingMp3BaseIE): _VALID_URL = ZingMp3BaseIE._VALID_URL_TMPL % 'album|playlist' _TESTS = [{ 'url': 'http://mp3.zing.vn/album/Lau-Dai-Tinh-Ai-Bang-Kieu-Minh-Tuyet/ZW...
```suggestion for item in traverse_obj(data, ('song', 'items')) or []: ```
return self._extract_item(data, song_id, type_url, True) class ZingMp3AlbumIE(ZingMp3BaseIE): _VALID_URL = ZingMp3BaseIE._VALID_URL_TMPL % 'album|playlist' _TESTS = [{ 'url': 'http://mp3.zing.vn/album/Lau-Dai-Tinh-Ai-Bang-Kieu-Minh-Tuyet/ZWZBWDAF.html', 'info_dict': { '_typ...
@@ -149,12 +193,12 @@ class ZingMp3AlbumIE(ZingMp3BaseIE): }] IE_NAME = 'zingmp3:album' - def _process_data(self, data): + def _process_data(self, data, song_id, type_url): def entries(): - for item in (data.get('items') or []): - entry = self._extract_item(item, Fal...
yt_dlp/extractor/zingmp3.py
26
Python
0.571
suggestion
88
33
32
false
Feat: update new version for zingmp3
2,889
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
_TESTS = [{ 'url': 'http://mp3.zing.vn/album/Lau-Dai-Tinh-Ai-Bang-Kieu-Minh-Tuyet/ZWZBWDAF.html', 'info_dict': { '_type': 'playlist', 'id': 'ZWZBWDAF', 'title': 'Lâu Đài Tình Ái', }, 'playlist_count': 9, }, { 'url': 'http://mp3.zing.vn/...
```suggestion return self.playlist_result(entries(), traverse_obj(data, 'id', 'encodeId'), traverse_obj(data, 'name', 'title')) ```
'url': 'http://mp3.zing.vn/album/Lau-Dai-Tinh-Ai-Bang-Kieu-Minh-Tuyet/ZWZBWDAF.html', 'info_dict': { '_type': 'playlist', 'id': 'ZWZBWDAF', 'title': 'Lâu Đài Tình Ái', }, 'playlist_count': 9, }, { 'url': 'http://mp3.zing.vn/playlist/Duong-H...
@@ -149,12 +193,12 @@ class ZingMp3AlbumIE(ZingMp3BaseIE): }] IE_NAME = 'zingmp3:album' - def _process_data(self, data): + def _process_data(self, data, song_id, type_url): def entries(): - for item in (data.get('items') or []): - entry = self._extract_item(item, Fal...
yt_dlp/extractor/zingmp3.py
26
Python
0.714
suggestion
141
27
26
false
Feat: update new version for zingmp3
2,889
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
lyric = traverse_obj(info_lyric, ('data', 'file')) subtitles = { 'origin': [{ 'url': lyric, }], } if lyric else None album = item.get('album') or {} return { 'id': item_id, 'title': title, 'formats'...
```suggestion self._request_webpage(HEADRequest(self._DOMAIN), None, note='Updating cookies') ```
lyric = traverse_obj(info_lyric, ('data', 'file')) subtitles = { 'origin': [{ 'url': lyric, }], } if lyric else None album = item.get('album') or {} return { 'id': item_id, 'title': title, 'formats'...
@@ -34,62 +59,78 @@ def _extract_item(self, item, fatal): 'height': int_or_none(self._search_regex( r'^(\d+)p', res, 'resolution', default=None)), }) - else: - formats.append({ - 'ext': 'm...
yt_dlp/extractor/zingmp3.py
26
Python
0.714
suggestion
111
51
51
false
Feat: update new version for zingmp3
2,889
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
range_header += compat_str(end) req.add_header('Range', range_header) def establish_connection(): ctx.chunk_size = (random.randint(int(chunk_size * 0.95), chunk_size) if not is_test and chunk_size else chunk_size) if ctx.resume_l...
shouldn't this check happen even if req_end?
range_header += compat_str(end) req.add_header('Range', range_header) def establish_connection(): ctx.chunk_size = (random.randint(int(chunk_size * 0.95), chunk_size) if not is_test and chunk_size else chunk_size) if ctx.resume_l...
@@ -99,9 +105,13 @@ def establish_connection(): else: range_start = None ctx.is_resume = False - range_end = range_start + ctx.chunk_size - 1 if ctx.chunk_size else None - if range_end and ctx.data_len is not None and range_end >= ctx.data_len: - ...
yt_dlp/downloader/http.py
26
Python
0.143
question
44
51
51
false
[downloader/fragment] Fix bugs around resuming with Range
2,901
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
def _extract_stream(self, video_id, stream, base_info): formats = [] subtitles = {} http_stream_url = stream.get('StreamHttpUrl') # TODO: find test stream_url = stream.get('StreamUrl') if http_stream_url: formats.append({'url': http_stream_url}) if not s...
```suggestion 'title': join_nonempty(title, tag, delim=' - '), ```
'ID': 0, 'InvocationID': invocation_id, 'PlaybackSpeed': 1, 'SecondsListened': duration - 1, 'SecondsRejected': 0, 'StartPosition': 0, 'StartReason': 2,...
@@ -0,0 +1,427 @@ +import json +import functools +from random import random + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_urlparse, + compat_urlparse +) + +from ..utils import ( + bug_reports_message, + ExtractorError, + get_first, + int_or_none, + OnDemandPaged...
yt_dlp/extractor/panopto.py
26
Python
0.571
suggestion
80
51
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
if not to_cancel: return for task in to_cancel: task.cancel() loop.run_until_complete( asyncio.tasks.gather(*to_cancel, loop=loop, return_exceptions=True)) for task in to_cancel: if task.cancelled(): continue ...
This was made a function in youtube.py because it was being used a lot (33 hits). Considering it is just thin wrapper around travsere_obj, idk if this is useful enough in general to be a util function. Excluding this extractor (6 hits), this pattern is only used 5 other times ```py yt_dlp • extractor\facebook.py: ...
@staticmethod def hide_login_info(opts): PRIVATE_OPTS = set(['-p', '--password', '-u', '--username', '--video-password', '--ap-password', '--ap-username']) eqre = re.compile('^(?P<key>' + ('|'.join(re.escape(po) for po in PRIVATE_OPTS)) + ')=.+$') def _scrub_eq(o): m = eqre....
@@ -5407,3 +5407,7 @@ def _cancel_all_tasks(loop): has_websockets = bool(compat_websockets) + + +def get_first(obj, keys, **kwargs): + return traverse_obj(obj, (..., *variadic(keys)), **kwargs, get_all=False)
yt_dlp/utils.py
26
Python
0.857
refactor
911
27
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
}, { # Folder that contains 8 folders and a playlist 'url': 'https://howtovideos.hosted.panopto.com/Panopto/Pages/Sessions/List.aspx?noredirect=true#folderID=%224b9de7ae-0080-4158-8496-a9ba01692c2e%22', 'info_dict': { 'id': '4b9de7ae-0080-4158-8496-a9b...
```suggestion base_url, '/Services/Data.svc/GetSessions', f'{display_id} page {page+1}', ```
_VALID_URL = PanoptoBaseIE.BASE_URL_RE + r'/Pages/Sessions/List\.aspx' _PAGE_SIZE = 250 _TESTS = [ { 'url': 'https://demo.hosted.panopto.com/Panopto/Pages/Sessions/List.aspx#folderID=%22e4c6a2fc-1214-4ca0-8fb7-aef2e29ff63a%22', 'info_dict': { 'id': 'e4c6a2fc-1...
@@ -0,0 +1,427 @@ +import json +import functools +from random import random + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_urlparse, + compat_urlparse +) + +from ..utils import ( + bug_reports_message, + ExtractorError, + get_first, + int_or_none, + OnDemandPaged...
yt_dlp/extractor/panopto.py
26
Python
0.714
suggestion
106
51
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
def _entries(self, base_url, playlist_id, session_list_id): session_list_info = self._call_api( base_url, f'/Api/SessionLists/{session_list_id}?collections[0].maxCount=500&collections[0].name=ViewableItemsOnly', playlist_id) items = session_list_info['Items'] if len(items) == 500...
```suggestion base_url, playlist_id = self._match_valid_url(url).group('base_url', 'id') ```
_VALID_URL = PanoptoBaseIE.BASE_URL_RE + r'/Pages/(Viewer|Embed)\.aspx.*(?:\?|&)pid=(?P<id>[a-f0-9-]+)' _TESTS = [ { 'url': 'https://howtovideos.hosted.panopto.com/Panopto/Pages/Viewer.aspx?pid=f3b39fcf-882f-4849-93d6-a9f401236d36&id=5fa74e93-3d87-4694-b60e-aaa4012214ed&advance=true', ...
@@ -0,0 +1,427 @@ +import json +import functools +from random import random + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_urlparse, + compat_urlparse +) + +from ..utils import ( + bug_reports_message, + ExtractorError, + get_first, + int_or_none, + OnDemandPaged...
yt_dlp/extractor/panopto.py
26
Python
0.714
suggestion
102
51
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
'info_dict': { 'title': 'Featured Video Tutorials', 'id': 'f3b39fcf-882f-4849-93d6-a9f401236d36', 'description': '', }, 'playlist_mincount': 36 }, { 'url': 'https://utsa.hosted.panopto.com/Panopto/Pages/Viewe...
why add bug_reports_message to this?
'title': delivery.get('SessionName'), 'cast': traverse_obj(delivery, ('Contributors', ..., 'DisplayName'), default=[], expected_type=lambda x: x or None), 'timestamp': session_start_time - 11640000000 if session_start_time else None, 'duration': delivery.get('Duration'), ...
@@ -0,0 +1,427 @@ +import json +import functools +from random import random + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_urlparse, + compat_urlparse +) + +from ..utils import ( + bug_reports_message, + ExtractorError, + get_first, + int_or_none, + OnDemandPaged...
yt_dlp/extractor/panopto.py
26
Python
0.214
bug
36
51
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
if not stream_url and not http_stream_url: return media_type = stream.get('ViewerMediaFileTypeName') if media_type in ('hls', ): m3u8_formats, subtitles = self._extract_m3u8_formats_and_subtitles(stream_url, video_id, 'mp4') formats.extend(m3u8_formats) ...
```suggestion base_url, video_id = self._match_valid_url(url).group('base_url', 'id') ```
'StopReason': None, 'StreamID': stream_id, 'TimeStamp': timestamp_str, 'UpdatesRejected': 0 }, ]} self._download_webpage( base_url + '/Services/Analytics.svc/A...
@@ -0,0 +1,427 @@ +import json +import functools +from random import random + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_urlparse, + compat_urlparse +) + +from ..utils import ( + bug_reports_message, + ExtractorError, + get_first, + int_or_none, + OnDemandPaged...
yt_dlp/extractor/panopto.py
26
Python
0.571
suggestion
99
51
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
'isKollectiveAgentInstalled': 'false', 'isEmbed': 'false', 'responseType': 'json', } ) delivery = delivery_info['Delivery'] session_start_time = int_or_none(delivery.get('SessionStartTime')) # Podcast stream is usually the com...
```suggestion 'cast': traverse_obj(delivery, ('Contributors', ..., 'DisplayName')), ``` just this should be enough, no?
'isEditing': 'false', 'isKollectiveAgentInstalled': 'false', 'isEmbed': 'false', 'responseType': 'json', } ) delivery = delivery_info['Delivery'] session_start_time = int_or_none(delivery.get('SessionStartTime')) ...
@@ -0,0 +1,444 @@ +import re +import calendar +import json +import functools +from datetime import datetime +from random import random + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_urlparse, + compat_urlparse +) + +from ..utils import ( + bug_reports_message, + Extractor...
yt_dlp/extractor/panopto.py
26
Python
0.929
question
134
51
51
false
[panopto] Add Extractors
2,908
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
'X-Niconico-Language': 'en-us' } def _call_api(self, list_id, resource, query): "Implement this in child class" pass @staticmethod def _parse_owner(item): owner = item.get('owner') or {} if owner: return { 'uploader': owner.get('name'...
can't it be rewritten with one `traverse_obj` invocation?
'X-Frontend-Version': '0', 'X-Niconico-Language': 'en-us' } def _call_api(self, list_id, resource, query): "Implement this in child class" pass @staticmethod def _parse_owner(item): return { 'uploader': traverse_obj(item, ('owner', 'name')), ...
@@ -606,8 +609,63 @@ def get_video_info_xml(items): } -class NiconicoPlaylistIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/(?:user/\d+/|my/)?mylist/(?P<id>\d+)' +class NiconicoPlaylistBaseIE(InfoExtractor): + _PAGE_SIZE = 100 + + _API_HEADERS = { + 'X-Frontend-ID': '6...
yt_dlp/extractor/niconico.py
26
Python
0.357
question
57
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
Lesmiscore
Lesmiscore
'webpage_url': webpage_url, } class NiconicoPlaylistBaseIE(InfoExtractor): _PAGE_SIZE = 100 _API_HEADERS = { 'X-Frontend-ID': '6', 'X-Frontend-Version': '0', 'X-Niconico-Language': 'en-us' } def _call_api(self, list_id, resource, query): "Implement...
Isn't this better? ```suggestion if owner and (owner.get('id') or owner.get('name')): return { 'uploader': owner.get('name'), 'uploader_id': owner.get('id'), } return {} ```
'webpage_url': webpage_url, } class NiconicoPlaylistBaseIE(InfoExtractor): _PAGE_SIZE = 100 _API_HEADERS = { 'X-Frontend-ID': '6', 'X-Frontend-Version': '0', 'X-Niconico-Language': 'en-us' } def _call_api(self, list_id, resource, query): "Implement...
@@ -606,8 +610,64 @@ def get_video_info_xml(items): } -class NiconicoPlaylistIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/(?:user/\d+/|my/)?mylist/(?P<id>\d+)' +class NiconicoPlaylistBaseIE(InfoExtractor): + _PAGE_SIZE = 100 + + _API_HEADERS = { + 'X-Frontend-ID': '6...
yt_dlp/extractor/niconico.py
26
Python
0.857
question
253
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
Ashish0804
Lesmiscore
} return {} def _fetch_page(self, list_id, page): page += 1 resp = self._call_api(list_id, 'page %d' % page, { 'page': page, 'pageSize': self._PAGE_SIZE, }) # this is needed to support both mylist and user for video in traverse_obj...
is this function really needed? Like it's just 2 lines...that too non fatal ones. Why not just use traverse_obj directly here?
def _fetch_page(self, list_id, page): page += 1 resp = self._call_api(list_id, 'page %d' % page, { 'page': page, 'pageSize': self._PAGE_SIZE, }) # this is needed to support both mylist and user for video in traverse_obj(resp, ('items', ..., ('video', N...
@@ -606,8 +610,64 @@ def get_video_info_xml(items): } -class NiconicoPlaylistIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/(?:user/\d+/|my/)?mylist/(?P<id>\d+)' +class NiconicoPlaylistBaseIE(InfoExtractor): + _PAGE_SIZE = 100 + + _API_HEADERS = { + 'X-Frontend-ID': '6...
yt_dlp/extractor/niconico.py
26
Python
0.429
question
128
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
Ashish0804
Lesmiscore
'playlist_mincount': 10, # as of 2021/03/17 }, { 'url': 'https://www.nicovideo.jp/series/12312/', 'info_dict': { 'id': '12312', 'title': 'バトルスピリッツ お勧めカード紹介(調整中)', }, 'playlist_mincount': 97, # as of 2021/03/17 }, { 'url': 'https://nico.ms...
```suggestion for match in re.finditer(r'href="/watch/([a-z0-9]+)" data-href="/watch/\1', webpage): v_id = match.group(1) if not v_id: continue playlist.append(self.url_result(f'https://www.nicovideo.jp/watch/{v_id}', video_id=v_id)) ```
'title': 'バトルスピリッツ お勧めカード紹介(調整中)', }, 'playlist_mincount': 97, # as of 2021/03/17 }, { 'url': 'https://nico.ms/series/203559', 'only_matching': True, }] def _real_extract(self, url): list_id = self._match_id(url) webpage = self._download_webpage(...
@@ -618,48 +678,116 @@ class NiconicoPlaylistIE(InfoExtractor): 'uploader': 'のっく', 'uploader_id': '805442', }, - 'playlist_mincount': 225, + 'playlist_mincount': 291, }, { 'url': 'https://www.nicovideo.jp/user/805442/mylist/27411728', 'only_matchin...
yt_dlp/extractor/niconico.py
26
Python
0.786
suggestion
303
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
Ashish0804
Lesmiscore
'webpage_url': webpage_url, } class NiconicoPlaylistBaseIE(InfoExtractor): _PAGE_SIZE = 100 _API_HEADERS = { 'X-Frontend-ID': '6', 'X-Frontend-Version': '0', 'X-Niconico-Language': 'en-us' } def _call_api(self, list_id, resource, query): "Implement...
why not just do ```suggestion def _parse_owner(item): return { 'uploader': traverse_obj(item, ('owner', 'name')), 'uploader_id': traverse_obj(item, ('owner', 'id')), } ``` returning `None` when value is unknown is fine
'webpage_url': webpage_url, } class NiconicoPlaylistBaseIE(InfoExtractor): _PAGE_SIZE = 100 _API_HEADERS = { 'X-Frontend-ID': '6', 'X-Frontend-Version': '0', 'X-Niconico-Language': 'en-us' } def _call_api(self, list_id, resource, query): "Implement...
@@ -606,8 +610,64 @@ def get_video_info_xml(items): } -class NiconicoPlaylistIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/(?:user/\d+/|my/)?mylist/(?P<id>\d+)' +class NiconicoPlaylistBaseIE(InfoExtractor): + _PAGE_SIZE = 100 + + _API_HEADERS = { + 'X-Frontend-ID': '6...
yt_dlp/extractor/niconico.py
26
Python
0.786
suggestion
270
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
'pageSize': self._PAGE_SIZE, }) # this is needed to support both mylist and user for video in traverse_obj(resp, ('items', ..., ('video', None))) or []: video_id = video.get('id') if not video_id: # skip {"video": {"id": "blablabla", ...}} ...
the only way the function is called seems to be as `self._entries(functools.partial(self._fetch_page, list_id))`. So doesn't this make more sense ```suggestion def _entries(self, list_id): return OnDemandPagedList(functools.partial(self._fetch_page, list_id), self._PAGE_SIZE) ```
for video in traverse_obj(resp, ('items', ..., ('video', None))) or []: video_id = video.get('id') if not video_id: # skip {"video": {"id": "blablabla", ...}} continue count = video.get('count') or {} get_count = lambda x: int_or_no...
@@ -606,8 +610,64 @@ def get_video_info_xml(items): } -class NiconicoPlaylistIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/(?:user/\d+/|my/)?mylist/(?P<id>\d+)' +class NiconicoPlaylistBaseIE(InfoExtractor): + _PAGE_SIZE = 100 + + _API_HEADERS = { + 'X-Frontend-ID': '6...
yt_dlp/extractor/niconico.py
26
Python
0.786
suggestion
298
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
}, 'playlist_mincount': 291, }, { 'url': 'https://www.nicovideo.jp/user/805442/mylist/27411728', 'only_matching': True, }, { 'url': 'https://www.nicovideo.jp/my/mylist/#/68048635', 'only_matching': True, }] def _call_api(self, list_id, resource, query): ...
```suggestion return self.playlist_result( entries, list_id, mylist.get('name'), mylist.get('description'), **self._parse_owner(mylist)) ```
'url': 'https://www.nicovideo.jp/user/805442/mylist/27411728', 'only_matching': True, }, { 'url': 'https://www.nicovideo.jp/my/mylist/#/68048635', 'only_matching': True, }] def _call_api(self, list_id, resource, query): return self._download_json( f'https...
@@ -618,48 +678,119 @@ class NiconicoPlaylistIE(InfoExtractor): 'uploader': 'のっく', 'uploader_id': '805442', }, - 'playlist_mincount': 225, + 'playlist_mincount': 291, }, { 'url': 'https://www.nicovideo.jp/user/805442/mylist/27411728', 'only_matchin...
yt_dlp/extractor/niconico.py
26
Python
0.714
suggestion
163
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
'info_dict': { 'id': '12312', 'title': 'バトルスピリッツ お勧めカード紹介(調整中)', }, 'playlist_mincount': 97, # as of 2021/03/17 }, { 'url': 'https://nico.ms/series/203559', 'only_matching': True, }] def _real_extract(self, url): list_id = self._match...
```suggestion playlist = [ self.url_result(f'https://www.nicovideo.jp/watch/{v_id}', video_id=v_id) for v_id in re.findall(r'href="/watch/([a-z0-9]+)" data-href="/watch/\1', webpage)] ```
}, { 'url': 'https://nico.ms/series/203559', 'only_matching': True, }] def _real_extract(self, url): list_id = self._match_id(url) webpage = self._download_webpage(f'https://www.nicovideo.jp/series/{list_id}', list_id) title = self._search_regex( (r'<tit...
@@ -618,48 +678,119 @@ class NiconicoPlaylistIE(InfoExtractor): 'uploader': 'のっく', 'uploader_id': '805442', }, - 'playlist_mincount': 225, + 'playlist_mincount': 291, }, { 'url': 'https://www.nicovideo.jp/user/805442/mylist/27411728', 'only_matchin...
yt_dlp/extractor/niconico.py
26
Python
0.786
suggestion
223
51
51
false
[niconico] Add playlist extractors and refactor
2,915
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
} }, { # quote post 'url': 'https://gettr.com/post/pxn5b743a9', 'only_matching': True, }, { # streaming embed 'url': 'https://gettr.com/post/pxlu8p3b13', 'only_matching': True, }] def _real_extract(self, url): post_id = self._match_id(url)...
if player_type check is not needed. `None != 'stream'`
}, { # quote post 'url': 'https://gettr.com/post/pxn5b743a9', 'only_matching': True, }, { # quote with video 'url': 'https://gettr.com/post/pxtiiz5ca2', 'only_matching': True, }, { # streaming embed 'url': 'https://gettr.com/post/pxlu8p3b13', ...
@@ -50,31 +52,52 @@ class GettrIE(GettrBaseIE): 'ext': 'mp4', 'uploader': 'Neues Forum Freiheit', 'uploader_id': 'nf_freiheit', + 'upload_date': '20210718', 'thumbnail': r're:^https?://.+/out\.jpg', - 'timestamp': 1626594455017, + 'tim...
yt_dlp/extractor/gettr.py
26
Python
0.5
suggestion
55
51
51
false
[Gettr] Improve extractor
2,920
yt-dlp/yt-dlp
132,642
Python
Ashish0804
ghost
post_data = api_data.get('data') user_data = try_get(api_data, lambda x: x['aux']['uinf'][post_data['uid']], dict) or {} vid = post_data.get('vid') ovid = post_data.get('ovid') if post_data.get('p_type') == 'stream': return self.url_result(f'https://gettr.com/stream...
no, the other one was better. I was only asking for clarification
post_data = api_data.get('data') user_data = try_get(api_data, lambda x: x['aux']['uinf'][post_data['uid']], dict) or {} vid = post_data.get('vid') ovid = post_data.get('ovid') if post_data.get('p_type') == 'stream': return self.url_result(f'https://gettr.com/stream...
@@ -106,7 +106,7 @@ def _real_extract(self, url): uploader = str_or_none( user_data.get('nickname') - or self._search_regex(r'^(.+?) on GETTR', self._og_search_title(webpage, default=''), 'uploader', fatal=False)) + or self._search_regex(r'^(.+?) on GETTR : ', self._og_sear...
yt_dlp/extractor/gettr.py
26
Python
0.286
suggestion
65
51
51
false
[Gettr] Improve extractor
2,920
yt-dlp/yt-dlp
132,642
Python
pukkandan
ghost
post_data = api_data.get('data') user_data = try_get(api_data, lambda x: x['aux']['uinf'][post_data['uid']], dict) or {} vid = post_data.get('vid') ovid = post_data.get('ovid') if post_data.get('p_type') == 'stream': return self.url_result(f'https://gettr.com/stream...
```suggestion or self._search_regex(r'^(.+?) on GETTR', self._og_search_title(webpage, default=''), 'uploader', fatal=False)) ```
post_data = api_data.get('data') user_data = try_get(api_data, lambda x: x['aux']['uinf'][post_data['uid']], dict) or {} vid = post_data.get('vid') ovid = post_data.get('ovid') if post_data.get('p_type') == 'stream': return self.url_result(f'https://gettr.com/stream...
@@ -50,43 +51,69 @@ class GettrIE(GettrBaseIE): 'ext': 'mp4', 'uploader': 'Neues Forum Freiheit', 'uploader_id': 'nf_freiheit', + 'upload_date': '20210718', 'thumbnail': r're:^https?://.+/out\.jpg', - 'timestamp': 1626594455017, + 'tim...
yt_dlp/extractor/gettr.py
26
Python
0.714
suggestion
143
51
51
false
[Gettr] Improve extractor
2,920
yt-dlp/yt-dlp
132,642
Python
pukkandan
ghost
IE_NAME = 'telegram:embed' _VALID_URL = r'https?:\/\/t\.me\/(?P<channel_name>.*?)\/(?P<id>\d+)($|\W)' _TEST = { 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', 'title': 'Europa Press', }, } def _real_extra...
call sort_formats before returning
IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', 'title': 'Europa Press', 'description': '6ce2d7e8d56eda1...
@@ -0,0 +1,45 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?:\/\/t\.me\/(?P<channel_name>.*?)\/(?P<id>\d+)($|\W)' + _TEST = { + 'url': 'https://t.me/europa_press/613', + 'info_dict': { + 'id': '613',...
yt_dlp/extractor/telegram.py
26
Python
0.071
style
34
42
34
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
from .common import InfoExtractor class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?:\/\/t\.me\/(?P<channel_name>.*?)\/(?P<id>\d+)($|\W)' _TEST = { 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', ...
```suggestion _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' ```
from .common import InfoExtractor class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', ...
@@ -0,0 +1,50 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?:\/\/t\.me\/(?P<channel_name>.*?)\/(?P<id>\d+)($|\W)'
yt_dlp/extractor/telegram.py
6
Python
0.571
suggestion
90
31
31
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
'invernaderos y viviendas bit.ly/3pRQv9J ', 'thumbnail': r're:^https?:\/\/cdn.*?telesco\.pe\/file\/\w+', }, } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id) title = se...
```suggestion formats = [{ 'ext': 'mp4', 'url': self._proto_relative_url(source), 'vcodec': 'none' }] ```
from .common import InfoExtractor class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', ...
@@ -0,0 +1,50 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?:\/\/t\.me\/(?P<channel_name>.*?)\/(?P<id>\d+)($|\W)' + _TEST = { + 'url': 'https://t.me/europa_press/613', + 'info_dict': { + 'id': '613',...
yt_dlp/extractor/telegram.py
26
Python
0.714
suggestion
163
37
38
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
'thumbnail': r're:^https?:\/\/cdn.*?telesco\.pe\/file\/\w+', }, } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id) webpage_embed = self._download_webpage(f'{url}?embed=1', video_id=video_id) ...
Remove unnecessary escapes ```suggestion 'thumbnail': self._search_regex(r'tgme_widget_message_video_thumb"[^>]+background-image:url\(\'([^\']+)\'\)', ```
from .common import InfoExtractor class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', ...
@@ -0,0 +1,42 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' + _TEST = { + 'url': 'https://t.me/europa_press/613', + 'info_dict': { + 'id': '613', + ...
yt_dlp/extractor/telegram.py
26
Python
0.786
security
169
30
38
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', 'title': 'Europa Press', 'description': '6ce2d7e8d56eda16d80607b23db7b252', 'thumbnail': r're:^https?:\/\/cdn.*?telesco\.pe\/file\/\w+', }, } def...
```suggestion video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) webpage_embed = self._download_webpage(f'{url}?embed=1', video_id) formats = [{ 'url': self._proto_relative_url(self._search_regex( '<video[^>]+src="([^"]+)"',...
'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', 'title': 'Europa Press', 'description': '6ce2d7e8d56eda16d80607b23db7b252', 'thumbnail': r're:^https?:\/\/cdn.*?telesco\.pe\/file\/\w+', }, }] de...
@@ -0,0 +1,42 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' + _TEST = { + 'url': 'https://t.me/europa_press/613', + 'info_dict': { + 'id': '613', + ...
yt_dlp/extractor/telegram.py
26
Python
0.786
suggestion
458
36
31
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
from .common import InfoExtractor class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TEST = { 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', ...
The URL passed can be `https://t.me/europa_press/613?embed=1`, `https://t.me/europa_press/613?xxx=yyy`, `https://t.me/europa_press/613#abcd` etc. Use urllib to correctly add the embed query or construct the URL from `video_id`
from .common import InfoExtractor class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', ...
@@ -0,0 +1,42 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' + _TEST = { + 'url': 'https://t.me/europa_press/613', + 'info_dict': { + 'id': '613', + ...
yt_dlp/extractor/telegram.py
23
Python
0.643
suggestion
229
43
38
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TEST = { 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', 'title': 'Europa Press', ...
vcodec=none implies the format is audio-only
class TelegramEmbedIE(InfoExtractor): IE_NAME = 'telegram:embed' _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://t.me/europa_press/613', 'info_dict': { 'id': '613', 'ext': 'mp4', 'title': 'Europa Press', ...
@@ -0,0 +1,38 @@ +from .common import InfoExtractor + + +class TelegramEmbedIE(InfoExtractor): + IE_NAME = 'telegram:embed' + _VALID_URL = r'https?://t\.me/(?P<channel_name>[^/]+)/(?P<id>\d+)' + _TEST = { + 'url': 'https://t.me/europa_press/613', + 'info_dict': { + 'id': '613', + ...
yt_dlp/extractor/telegram.py
26
Python
0.071
style
44
38
37
false
[New extractor] telegram
2,922
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
import json from .common import InfoExtractor from ..utils import js_to_json, try_get, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' _DOMAIN = 'https://www.lightcast.com/embed/' _TEST = { 'url': 'https://...
wrong extension mate. Looks like u will have to manually set it to mp4
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2IT...
@@ -0,0 +1,60 @@ +import json + +from .common import InfoExtractor +from ..utils import js_to_json, try_get, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST ...
yt_dlp/extractor/daystar.py
15
Python
0.214
bug
71
40
40
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' _DOMAIN = 'https://www.lightcast.com/embed/' _TEST = { 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2ITM', 'ext...
```suggestion webpage_iframe = self._download_webpage(src_iframe.replace('player.php', 'config2.php'), video_id=video_id, headers={ ```
_VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2ITM', 'ext': 'mp4', 'title': 'The Dark World of COVID Pt. 1 | Aaron Siri', 'description': 'a420d320dda734e5...
@@ -0,0 +1,60 @@ +import json + +from .common import InfoExtractor +from ..utils import js_to_json, try_get, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST ...
yt_dlp/extractor/daystar.py
26
Python
0.786
suggestion
145
51
43
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
_TEST = { 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2ITM', 'ext': 'm3u8', 'title': 'The Dark World of COVID Pt. 1 | Aaron Siri', }, } def _real_extract(self, url): video_id = self._match_id(url) webpag...
We have a parse_json functions. Can u see if that works?
'id': '0MTO2ITM', 'ext': 'mp4', 'title': 'The Dark World of COVID Pt. 1 | Aaron Siri', 'description': 'a420d320dda734e5f29458df3606c5f4', 'thumbnail': r're:^https?://.+\.jpg', }, }] def _real_extract(self, url): video_id = self._match_...
@@ -0,0 +1,60 @@ +import json + +from .common import InfoExtractor +from ..utils import js_to_json, try_get, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST ...
yt_dlp/extractor/daystar.py
26
Python
0.214
question
57
51
39
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
title = self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True) description = self._html_search_meta(['og:description', 'twitter:description'], webpage, fatal=True) src_iframe = self._search_regex(r'\<iframe.*?src=\"(.*?)\"', webpage, 'src iframe') config_url = src_i...
```suggestion if source.get('type') == 'm3u8': formats.extend(self._extract_m3u8_formats(urljoin(self._DOMAIN, file), video_id, 'mp4', fatal=False, headers={ ```
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2IT...
@@ -0,0 +1,60 @@ +import json + +from .common import InfoExtractor +from ..utils import js_to_json, try_get, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST ...
yt_dlp/extractor/daystar.py
26
Python
0.929
refactor
192
37
49
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id) title = self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True) description = self._html_search_meta(['og:description', 'twitter:description'], w...
```suggestion file = source.get('file') ```
video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, headers={'...
@@ -0,0 +1,60 @@ +import json + +from .common import InfoExtractor +from ..utils import js_to_json, try_get, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST ...
yt_dlp/extractor/daystar.py
26
Python
0.571
suggestion
57
42
30
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' _DOMAIN = 'https://www.lightcast.com/embed/' _TEST = { 'url': 'https://player.daystar.tv/0MTO...
_DOMAIN is only used once. So a var isn't needed
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2IT...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/'
yt_dlp/extractor/daystar.py
8
Python
0.143
suggestion
48
33
33
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
}, } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id) title = self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True) description = self._html_search_meta(['og:description', 'twitte...
```suggestion if file and source.get('type') == 'm3u8': ```
def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'c...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST = { + 'url': 'htt...
yt_dlp/extractor/daystar.py
26
Python
0.714
suggestion
73
38
31
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
} def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id) title = self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True) description = self._html_search_meta(['og:description', 'twitter:descripti...
Use _extract_m3u8_formats_and_subtitles
video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, headers={'...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST = { + 'url': 'htt...
yt_dlp/extractor/daystar.py
26
Python
0.143
refactor
39
37
30
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' _DOMAIN = 'https://www.lightcast.com/embed/' _TEST = { 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2ITM', 'ext...
```suggestion src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') ``` similar for other regexes. Non-greedy matching like this can cause catastrophic backtracking
class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2ITM', 'ext': 'mp4', 'title': 'The Dark World of COVID ...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' + _DOMAIN = 'https://www.lightcast.com/embed/' + _TEST = { + 'url': 'htt...
yt_dlp/extractor/daystar.py
26
Python
0.857
suggestion
207
51
45
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)' _DOMAIN = 'https://www.lightcast.com/embed/' _TEST = { 'url': 'https://player.daystar.tv/0MTO...
```suggestion _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' ```
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2IT...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?:\/\/player\.daystar\.tv\/(?P<id>\w+)($|\W)'
yt_dlp/extractor/daystar.py
7
Python
0.571
suggestion
80
32
32
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage(src_iframe.replace('player.php', 'config2.php'), video_id=video_id, headers={'Referer': src_iframe}) sources = self._par...
```suggestion video_id = self._match_id(url) src_iframe = self._search_regex( r'\<iframe[^>]+src="([^"]+)"', self._download_webpage(url, video_id), 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, hea...
webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, headers={'Referer': src_iframe}) sources = self._parse_json(self._search_regex( r'sources\:\s*(\[.*?\])', webpage_iframe, 'm3u8 source'), video_id, transform_source=js_to_json) ...
@@ -0,0 +1,49 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' + _TESTS = [{ + 'url': 'https://player.daystar.tv/0MTO2ITM', + 'info_dict': {...
yt_dlp/extractor/daystar.py
26
Python
1
refactor
1,489
27
26
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
video_id = self._match_id(url) src_iframe = self._search_regex( r'\<iframe[^>]+src="([^"]+)"', self._download_webpage(url, video_id), 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, headers={'Referer': src...
did u mean this? ```suggestion 'thumbnail': self._search_regex(r'image:\s*"([^"]+)', webpage_iframe, 'thumbnail'), ```
video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, headers={'...
@@ -0,0 +1,48 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' + _TESTS = [{ + 'url': 'https://player.daystar.tv/0MTO2ITM', + 'info_dict': {...
yt_dlp/extractor/daystar.py
26
Python
0.714
suggestion
133
30
30
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2IT...
```suggestion webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.replace('player.php', 'config2.php'), video_id, headers={'Referer': src_iframe...
from .common import InfoExtractor from ..utils import js_to_json, urljoin class DaystarClipIE(InfoExtractor): IE_NAME = 'daystar:clip' _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' _TESTS = [{ 'url': 'https://player.daystar.tv/0MTO2ITM', 'info_dict': { 'id': '0MTO2IT...
@@ -0,0 +1,48 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' + _TESTS = [{ + 'url': 'https://player.daystar.tv/0MTO2ITM', + 'info_dict': {...
yt_dlp/extractor/daystar.py
25
Python
0.857
suggestion
327
49
49
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
}, }] def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.repla...
```suggestion return { ```
}, }] def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) src_iframe = self._search_regex(r'\<iframe[^>]+src="([^"]+)"', webpage, 'src iframe') webpage_iframe = self._download_webpage( src_iframe.repla...
@@ -0,0 +1,47 @@ +from .common import InfoExtractor +from ..utils import js_to_json, urljoin + + +class DaystarClipIE(InfoExtractor): + IE_NAME = 'daystar:clip' + _VALID_URL = r'https?://player\.daystar\.tv/(?P<id>\w+)' + _TESTS = [{ + 'url': 'https://player.daystar.tv/0MTO2ITM', + 'info_dict': {...
yt_dlp/extractor/daystar.py
26
Python
0.429
suggestion
38
33
34
false
Feat: new extractor daystar
2,924
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
IE_NAME = 'mildom' IE_DESC = 'Record ongoing live by specific user in Mildom' _VALID_URL = r'https?://(?:(?:www|m)\.)mildom\.com/(?P<id>\d+)' def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(f'https://www.mildom.com/{video_id}', video_id) ...
```suggestion body={'host_id': video_id, 'type': 'hls'}) ```
webpage = self._download_webpage(f'https://www.mildom.com/{video_id}', video_id) enterstudio = self._call_api( 'https://cloudac.mildom.com/nonolive/gappserv/live/enterstudio', video_id, note='Downloading live metadata', query={'user_id': video_id}) result_video_id = ente...
@@ -107,60 +53,47 @@ class MildomIE(MildomBaseIE): def _real_extract(self, url): video_id = self._match_id(url) - url = 'https://www.mildom.com/%s' % video_id - - webpage = self._download_webpage(url, video_id) + webpage = self._download_webpage(f'https://www.mildom.com/{video_id}',...
yt_dlp/extractor/mildom.py
26
Python
0.714
suggestion
74
51
51
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
playback_token = self._call_api( 'https://cloudac.mildom.com/nonolive/gappserv/live/token', result_video_id, note='Obtaining live playback token', query=self._common_queries(), body={ 'host_id': video_id, 'type': 'hls', }) playback_token =...
```suggestion 'description': traverse_obj(enterstudio, 'intro', 'live_intro', expected_type=str), ```
raise ExtractorError('Failed to obtain live playback token') formats = self._extract_m3u8_formats( f'{servers["stream_server"]}/{video_id}_master.m3u8?{playback_token}', result_video_id, 'mp4', headers={ 'Referer': 'https://www.mildom.com/', '...
@@ -107,60 +53,47 @@ class MildomIE(MildomBaseIE): def _real_extract(self, url): video_id = self._match_id(url) - url = 'https://www.mildom.com/%s' % video_id - - webpage = self._download_webpage(url, video_id) + webpage = self._download_webpage(f'https://www.mildom.com/{video_id}',...
yt_dlp/extractor/mildom.py
26
Python
0.857
suggestion
115
51
51
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
'id': '10882672-buha9td2lrn97fk2jme0', 'ext': 'mp4', 'title': '【kson組長】CART RACER!!!', 'thumbnail': r're:^https?://.*\.(png|jpg)$', 'uploader_id': '10882672', 'uploader': 'kson組長(けいそん)', 'upload_date': '20201104', 'timestamp...
```suggestion title = self._html_search_meta(('og:description', 'description'), webpage, default=None) or autoplay.get('title') ```
'duration': 4657.25, 'description': 'WTF', }, }] def _real_extract(self, url): user_id, video_id = self._match_valid_url(url).group('user_id', 'id') webpage = self._download_webpage(f'https://www.mildom.com/playback/{user_id}/{video_id}', video_id) autop...
@@ -228,19 +160,9 @@ def _real_extract(self, url): 'v_id': video_id, })['playback'] - title = try_get( - autoplay, ( - lambda x: self._html_search_meta('og:description', webpage), - lambda x: x['title'], - ), compat_str) - ...
yt_dlp/extractor/mildom.py
26
Python
0.714
suggestion
141
51
51
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
'uploader_id': '10660174', }, }] def _real_extract(self, url): user_id, video_id = self._match_valid_url(url).group('user_id', 'id') webpage = self._download_webpage(f'https://www.mildom.com/clip/{video_id}', video_id) clip_detail = self._call_api( 'http...
any point in increasing the mincount?
return { 'id': video_id, 'title': self._html_search_meta( ('og:description', 'description'), webpage, default=None) or clip_detail.get('title'), 'timestamp': float_or_none(clip_detail.get('create_time')), 'duration': float_or_none(clip_detail.get('...
@@ -287,29 +274,28 @@ class MildomUserVodIE(MildomBaseIE): 'id': '10093333', 'title': 'Uploads from ねこばたけ', }, - 'playlist_mincount': 351, + 'playlist_mincount': 732,
yt_dlp/extractor/mildom.py
26
Python
0.071
question
37
51
51
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
'info_dict': { 'id': '10093333', 'title': 'Uploads from ねこばたけ', }, 'playlist_mincount': 732, }, { 'url': 'https://www.mildom.com/profile/10882672', 'info_dict': { 'id': '10882672', 'title': 'Uploads from kson組長(けいそん)', }...
```suggestion for x in reply: yield self.url_result(f'https://www.mildom.com/playback/{user_id}/{x["v_id"]}') ```
page += 1 reply = self._call_api( 'https://cloudac.mildom.com/nonolive/videocontent/profile/playbackList', user_id, note=f'Downloading page {page}', query={ 'user_id': user_id, 'page': page, 'limit': '30', }) if ...
@@ -287,29 +274,28 @@ class MildomUserVodIE(MildomBaseIE): 'id': '10093333', 'title': 'Uploads from ねこばたけ', }, - 'playlist_mincount': 351, + 'playlist_mincount': 732, }, { 'url': 'https://www.mildom.com/profile/10882672', 'info_dict': { ...
yt_dlp/extractor/mildom.py
26
Python
0.786
suggestion
136
39
28
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
pukkandan
Lesmiscore
'timestamp': 1597759093.0, 'uploader': 'kson組長(けいそん)', 'duration': 4302.58, 'uploader_id': '10882672', 'description': 'このステージ絶対乗り越えたい', 'upload_date': '20200818', }, }, { 'url': 'https://www.mildom.com/playback/10882672/10882672...
why make this a var? Don't see it being used anywhere other than webpage call...
'upload_date': '20200818', }, }, { 'url': 'https://www.mildom.com/playback/10882672/10882672-buha9td2lrn97fk2jme0', 'info_dict': { 'id': '10882672-buha9td2lrn97fk2jme0', 'ext': 'mp4', 'title': '【kson組長】CART RACER!!!', 'thumbnail': r...
@@ -216,9 +146,8 @@ class MildomVodIE(MildomBaseIE): }] def _real_extract(self, url): - m = self._match_valid_url(url) - user_id, video_id = m.group('user_id'), m.group('id') - url = 'https://www.mildom.com/playback/%s/%s' % (user_id, video_id) + user_id, video_id = self._match_v...
yt_dlp/extractor/mildom.py
26
Python
0.286
question
81
51
51
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
Ashish0804
Lesmiscore
}, }, { 'url': 'https://www.mildom.com/clip/10660174-2c539e6e277c4aaeb4b1fbe8d22cb902', 'info_dict': { 'id': '10660174-2c539e6e277c4aaeb4b1fbe8d22cb902', 'title': 'あ', 'timestamp': 1614769431, 'duration': 31, 'thumbnail': r're:https...
i personally would have made this fatal... It's just 1 url, why even set in format? Just return it in the `url` keyword
'duration': 31, 'thumbnail': r're:https?://.+', 'uploader': 'ドルゴルスレンギーン=ダグワドルジ', 'uploader_id': '10660174', }, }] def _real_extract(self, url): user_id, video_id = self._match_valid_url(url).group('user_id', 'id') webpage = self._download_...
@@ -266,12 +181,80 @@ def _real_extract(self, url): return { 'id': video_id, - 'title': title, - 'description': description, - 'timestamp': float_or_none(autoplay['publish_time'], scale=1000), - 'duration': float_or_none(autoplay['video_length'], scale...
yt_dlp/extractor/mildom.py
26
Python
0.5
style
121
51
51
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
Ashish0804
Lesmiscore
'id': '10093333', 'title': 'Uploads from ねこばたけ', }, 'playlist_mincount': 732, }, { 'url': 'https://www.mildom.com/profile/10882672', 'info_dict': { 'id': '10882672', 'title': 'Uploads from kson組長(けいそん)', }, 'playlist_min...
```suggestion for x in reply: v_id = x.get('v_id') if not v_id: continue yield self.url_result(f'https://www.mildom.com/playback/{user_id}/{v_id}') ```
}] def _fetch_page(self, user_id, page): page += 1 reply = self._call_api( 'https://cloudac.mildom.com/nonolive/videocontent/profile/playbackList', user_id, note=f'Downloading page {page}', query={ 'user_id': user_id, 'page': page, ...
@@ -287,29 +270,29 @@ class MildomUserVodIE(MildomBaseIE): 'id': '10093333', 'title': 'Uploads from ねこばたけ', }, - 'playlist_mincount': 351, + 'playlist_mincount': 732, }, { 'url': 'https://www.mildom.com/profile/10882672', 'info_dict': { ...
yt_dlp/extractor/mildom.py
26
Python
0.857
suggestion
217
39
31
false
[mildom] Rework extractors
2,940
yt-dlp/yt-dlp
132,642
Python
Ashish0804
Lesmiscore
'only_matching': True, }, { 'url': 'https://fptplay.vn/xem-video/nha-co-chuyen-hi-alls-well-ends-well-1997-6218995f6af792ee370459f0', 'only_matching': True, }] def _real_extract(self, url): type_url, video_id, episode = self._match_valid_url(url).group('type', 'id', 'episode...
```suggestion m = hashlib.md5().update(f'WEBv6Dkdsad90dasdjlALDDDS{timestamp}{path}'.encode()) ``` Any reason not to do this?
'url': 'https://fptplay.vn/xem-video/ma-toi-la-dai-gia-61f3aa8a6b3b1d2e73c60eb5/tap-3', 'md5': 'b35be968c909b3e4e1e20ca45dd261b1', 'info_dict': { 'id': '61f3aa8a6b3b1d2e73c60eb5', 'ext': 'mp4', 'title': 'Má Tôi Là Đại Gia - 3', 'description': 'md5:...
@@ -0,0 +1,101 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import hashlib +import time +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + join_nonempty, +) + + +class FptplayIE(InfoExtractor): + _VALID_URL = r'https?://fptplay\.vn/(?P<type>xem-video)/[^/]+\-(?P<...
yt_dlp/extractor/fptplay.py
26
Python
0.714
question
136
51
51
false
[fptplay] Add extractor
2,949
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
info = self._download_json(self.get_api_with_st_token(video_id, episode or 0), video_id) formats, subtitles = self._extract_m3u8_formats_and_subtitles(info['data']['url'], video_id, 'mp4') self._sort_formats(formats) return { 'id': video_id, 'title': join_nonempty...
```suggestion t = string.upper() r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' n = [int(f'0x{t[2 * o: 2 * o + 2]}', 16) for o in range(len(t) // 2)] ```
'url': 'https://fptplay.vn/xem-video/nha-co-chuyen-hi-alls-well-ends-well-1997-6218995f6af792ee370459f0', 'only_matching': True, }] def _real_extract(self, url): type_url, video_id, episode = self._match_valid_url(url).group('type', 'id', 'episode') webpage = self._download_webp...
@@ -0,0 +1,101 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import hashlib +import time +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + join_nonempty, +) + + +class FptplayIE(InfoExtractor): + _VALID_URL = r'https?://fptplay\.vn/(?P<type>xem-video)/[^/]+\-(?P<...
yt_dlp/extractor/fptplay.py
26
Python
0.786
suggestion
205
51
51
false
[fptplay] Add extractor
2,949
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for o in range(len(t) // 2): n.append(int(f'0x{t[2 * o: 2 * o + 2]}', 16)) def convert(e): t = '' n = 0 i = [0, 0, 0] a = [0, 0, 0, 0] s = len(e) ...
```suggestion for o in range(n, 3): ```
t = hashlib.md5(f'WEBv6Dkdsad90dasdjlALDDDS{timestamp}{path}'.encode()).hexdigest().upper() r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' n = [int(f'0x{t[2 * o: 2 * o + 2]}', 16) for o in range(len(t) // 2)] def convert(e): t = '' n = 0 ...
@@ -0,0 +1,101 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import hashlib +import time +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + join_nonempty, +) + + +class FptplayIE(InfoExtractor): + _VALID_URL = r'https?://fptplay\.vn/(?P<type>xem-video)/[^/]+\-(?P<...
yt_dlp/extractor/fptplay.py
26
Python
0.571
suggestion
57
42
43
false
[fptplay] Add extractor
2,949
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
def _real_extract(self, url): lang, internal_id, display_id = self._match_valid_url(url).group('lang', 'id', 'display_id') initial_state, app_config = self._get_embedded_json(self._download_webpage(url, display_id), display_id) if not self._get_cookies(url).get('etp_rt'): return...
return this as a generator or a `PagedList`
elif stream_type.split('_')[-1] == 'dash': adaptive_formats = self._extract_mpd_formats( stream['url'], display_id, mpd_id=format_id, note='Downloading %s information' % format_id, fatal=False) fo...
@@ -849,6 +863,35 @@ class CrunchyrollBetaShowIE(CrunchyrollBaseIE): }] def _real_extract(self, url): - lang, series_id = self._match_valid_url(url).group('lang', 'id') - return self.url_result(f'https://www.crunchyroll.com/{lang}{series_id.lower()}', - Crunchyrol...
yt_dlp/extractor/crunchyroll.py
26
Python
0.214
suggestion
43
34
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
'device_id': 'whatvalueshouldbeforweb', 'device_type': 'com.crunchyroll.static', 'access_token': 'giKq5eY27ny3cqz', 'referer': self._LOGIN_URL }) if upsell_response['code'] != 'ok': raise ExtractorError('Could not get sessio...
```suggestion def _get_beta_embedded_json(self, webpage, display_id): ```
'referer': self._LOGIN_URL }) if upsell_response['code'] != 'ok': raise ExtractorError('Could not get session id') session_id = upsell_response['data']['session_id'] login_response = self._download_json( f'{self._API_BASE}/login.1.json', None,...
@@ -92,6 +92,16 @@ def _login(self): def _real_initialize(self): self._login() + # Beta-specific, but needed for redirects + def _get_embedded_json(self, webpage, display_id):
yt_dlp/extractor/crunchyroll.py
26
Python
0.571
suggestion
79
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
continue subtitle = self._decrypt_subtitles(data, iv, sid).decode('utf-8') lang_code = self._search_regex(r'lang_code=["\']([^"\']+)', subtitle, 'subtitle_lang_code', fatal=False) if not lang_code: continue subtitles[lang_code] = self._extr...
Verbose log will automatically show this ```suggestion ```
continue subtitle = self._decrypt_subtitles(data, iv, sid).decode('utf-8') lang_code = self._search_regex(r'lang_code=["\']([^"\']+)', subtitle, 'subtitle_lang_code', fatal=False) if not lang_code: continue subtitles[lang_code] = self._extr...
@@ -412,6 +422,12 @@ def _real_extract(self, url): webpage = self._download_webpage( self._add_skip_wall(webpage_url), video_id, headers=self.geo_verification_headers()) + if re.search(r'<div id="preload-data">', webpage): + initial_state, app_config = self._get_embe...
yt_dlp/extractor/crunchyroll.py
26
Python
0.571
suggestion
60
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
season_re = r'<a [^>]+season-dropdown[^>]+>([^<]+)' paths = re.findall(f'(?s){episode_re}|{season_re}', webpage) entries, current_season = [], None for ep_id, ep, season in paths: if season: current_season = season continue entries...
```suggestion if not self.params: ```
entries.append(self.url_result( f'http://www.crunchyroll.com{ep}', CrunchyrollIE.ie_key(), ep_id, season=current_season)) return { '_type': 'playlist', 'id': show_id, 'title': title, 'entries': reversed(entries), } class Crun...
@@ -698,9 +720,49 @@ def _real_extract(self, url): } -class CrunchyrollBetaIE(CrunchyrollBaseIE): +class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): + api_domain = None + bucket = None + params = None + + def _get_params(self, lang): + if not CrunchyrollBetaBaseIE.api_domain:
yt_dlp/extractor/crunchyroll.py
26
Python
0.429
suggestion
47
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
basic_token = str(base64.b64encode(('%s:' % client_id).encode('ascii')), 'ascii') auth_response = self._download_json( f'{api_domain}/auth/v1/token', None, note='Authenticating with cookie', headers={ 'Authorization': 'Basic ' +...
```suggestion CrunchyrollBetaBaseIE.params = (api_domain, bucket, params) return CrunchyrollBetaBaseIE.params ```
params = { 'Policy': policy_response['cms']['policy'], 'Signature': policy_response['cms']['signature'], 'Key-Pair-Id': policy_response['cms']['key_pair_id'] } locale = traverse_obj(initial_state, ('localization', 'locale')) ...
@@ -698,9 +720,49 @@ def _real_extract(self, url): } -class CrunchyrollBetaIE(CrunchyrollBaseIE): +class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): + api_domain = None + bucket = None + params = None + + def _get_params(self, lang): + if not CrunchyrollBetaBaseIE.api_domain: + ...
yt_dlp/extractor/crunchyroll.py
26
Python
0.714
suggestion
136
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
req_num = list(map(int, req_num)) req_str = self._configuration_arg('substr') if req_str: req_str = req_str[0] def entries(): for season in seasons_response['items']: season_id = season['id'] if req_type == 'dub' and not season...
Can we return more info here? like season name, episode number etc. If so, the configuration_args become unnecessary and match_filter can be used to filter seasons without much overhead
}] def _real_extract(self, url): lang, internal_id, display_id = self._match_valid_url(url).group('lang', 'id', 'display_id') if not self._get_cookies(url).get('etp_rt'): return self._redirect_from_beta(url, lang, internal_id, display_id, False, CrunchyrollShowPlaylistIE.ie_key()) ...
@@ -849,6 +888,60 @@ class CrunchyrollBetaShowIE(CrunchyrollBaseIE): }] def _real_extract(self, url): - lang, series_id = self._match_valid_url(url).group('lang', 'id') - return self.url_result(f'https://www.crunchyroll.com/{lang}{series_id.lower()}', - Crunchyrol...
yt_dlp/extractor/crunchyroll.py
26
Python
0.429
question
185
34
45
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
f'{api_domain}/cms/v2{bucket}/seasons?series_id={internal_id}', display_id, note='Retrieving season list', query=params) def entries(): for season in seasons_response['items']: season_id = season['id'] episodes_response = self._dow...
There is nothing wrong with doing it this way, so I'm not gonna force you to change this. But it looks really ugly imho ```py yield { '_type': 'url', 'url': f'https://beta.crunchyroll.com/{lang}watch/{episode_id}/{episode_display_id}', ...
# coding: utf-8 from __future__ import unicode_literals import base64 import re import json import zlib from hashlib import sha1 from math import pow, sqrt, floor from .common import InfoExtractor from .vrv import VRVBaseIE from ..compat import ( compat_b64decode, compat_etree_Element, compat_etree_fromst...
@@ -827,22 +893,76 @@ def _real_extract(self, url): } -class CrunchyrollBetaShowIE(CrunchyrollBaseIE): +class CrunchyrollBetaShowIE(CrunchyrollBetaBaseIE): IE_NAME = 'crunchyroll:playlist:beta' - _VALID_URL = r'https?://beta\.crunchyroll\.com/(?P<lang>(?:\w{1,2}/)?)series/\w+/(?P<id>[\w\-]+)/?(?:\?...
yt_dlp/extractor/crunchyroll.py
26
Python
1
bug
472
34
959
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
if not lang_code: continue subtitles[lang_code] = self._extract_subtitles(subtitle) return subtitles def _real_extract(self, url): mobj = self._match_valid_url(url) video_id = mobj.group('id') if mobj.group('prefix') == 'm': mobil...
```suggestion url = app_config['baseSiteUrl'] + initial_state['router']['locations']['current']['pathname'] self.to_screen(f'{video_id}: Redirected to beta site - {url}') return self.url_result(f'{url}', CrunchyrollBetaIE.ie_key(), video_id) ```
iv = xpath_text(sub_doc, 'iv', 'subtitle iv') data = xpath_text(sub_doc, 'data', 'subtitle data') if not sid or not iv or not data: continue subtitle = self._decrypt_subtitles(data, iv, sid).decode('utf-8') lang_code = self._search_regex(r'lang...
@@ -406,6 +416,14 @@ def _real_extract(self, url): webpage = self._download_webpage( self._add_skip_wall(webpage_url), video_id, headers=self.geo_verification_headers()) + if re.search(r'<div id="preload-data">', webpage): + if not self._get_cookies(url).get('etp_rt'...
yt_dlp/extractor/crunchyroll.py
26
Python
0.786
suggestion
285
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
'playlist_count': 3, 'skip': 'Georestricted', }, { # geo-restricted (US), 18+ maturity wall, non-premium will be available since 2015.11.14 'url': 'http://www.crunchyroll.com/ladies-versus-butlers?skip_wall=1', 'only_matching': True, }, { 'url': 'http://www.crunch...
DRY! This can be put into a function
'playlist_count': 3, 'skip': 'Georestricted', }, { # geo-restricted (US), 18+ maturity wall, non-premium will be available since 2015.11.14 'url': 'http://www.crunchyroll.com/ladies-versus-butlers?skip_wall=1', 'only_matching': True, }, { 'url': 'http://www.crunch...
@@ -670,6 +688,14 @@ def _real_extract(self, url): # https:// gives a 403, but http:// does not self._add_skip_wall(url).replace('https://', 'http://'), show_id, headers=self.geo_verification_headers()) + if re.search(r'<div id="preload-data">', webpage): + if no...
yt_dlp/extractor/crunchyroll.py
26
Python
0.071
refactor
36
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
paths = re.findall(f'(?s){episode_re}|{season_re}', webpage) entries, current_season = [], None for ep_id, ep, season in paths: if season: current_season = season continue entries.append(self.url_result( f'http://www.crunch...
that's some weird indenting ```suggestion initial_state, app_config = self._get_beta_embedded_json(self._download_webpage( f'https://beta.crunchyroll.com/{lang}', None, note='Retrieving main page'), None) ```
continue entries.append(self.url_result( f'http://www.crunchyroll.com{ep}', CrunchyrollIE.ie_key(), ep_id, season=current_season)) return { '_type': 'playlist', 'id': show_id, 'title': title, 'entries': reversed(entries...
@@ -692,9 +718,45 @@ def _real_extract(self, url): } -class CrunchyrollBetaIE(CrunchyrollBaseIE): +class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): + params = None + + def _get_params(self, lang): + if not CrunchyrollBetaBaseIE.params: + initial_state, app_config = self._get_beta_emb...
yt_dlp/extractor/crunchyroll.py
26
Python
0.786
suggestion
240
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
for ep_id, ep, season in paths: if season: current_season = season continue entries.append(self.url_result( f'http://www.crunchyroll.com{ep}', CrunchyrollIE.ie_key(), ep_id, season=current_season)) return { '_type': 'pl...
if a var is only used once, it probly shouldn't be a var
return { '_type': 'playlist', 'id': show_id, 'title': title, 'entries': reversed(entries), } class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): params = None def _get_params(self, lang): if not CrunchyrollBetaBaseIE.params: ini...
@@ -692,9 +718,45 @@ def _real_extract(self, url): } -class CrunchyrollBetaIE(CrunchyrollBaseIE): +class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): + params = None + + def _get_params(self, lang): + if not CrunchyrollBetaBaseIE.params: + initial_state, app_config = self._get_beta_emb...
yt_dlp/extractor/crunchyroll.py
26
Python
0.286
suggestion
56
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
'description': 'md5:5579d1a0355cc618558ba23d27067a62', 'uploader': 'TBS', 'episode': 'Wicked Lord Shingan... Reborn', 'average_rating': 4.9, 'season': 'Love, Chunibyo & Other Delusions - Heart Throb -', 'thumbnail': 'https://img1.ak.crunchyroll.com...
```suggestion self.to_screen(f'{display_id}: Not logged in. Redirecting to https://www.crunchyroll.com/{lang}{series_id}/{display_id}-{video_id}') ```
'id': '648781', 'ext': 'mp4', 'episode_number': 1, 'timestamp': 1389173400, 'series': 'Love, Chunibyo & Other Delusions - Heart Throb -', 'description': 'md5:5579d1a0355cc618558ba23d27067a62', 'uploader': 'TBS', 'episode': '...
@@ -705,51 +767,55 @@ class CrunchyrollBetaIE(CrunchyrollBaseIE): 'uploader': 'Toei Animation', 'title': 'World Trigger Episode 73 – To the Future', 'upload_date': '20160402', + 'episode_number': 73, + 'series': 'World Trigger', + 'average_rating':...
yt_dlp/extractor/crunchyroll.py
26
Python
0.714
suggestion
164
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
for episode in episodes_response['items']: episode_id = episode['id'] episode_display_id = episode['slug_title'] yield { '_type': 'url', 'url': f'https://beta.crunchyroll.com/{lang}watch/{episode_...
```suggestion return self.playlist_result(entries(), internal_id, series_response.get('title')) ```
# coding: utf-8 from __future__ import unicode_literals import base64 import re import json import zlib from hashlib import sha1 from math import pow, sqrt, floor from .common import InfoExtractor from .vrv import VRVBaseIE from ..compat import ( compat_b64decode, compat_etree_Element, compat_etree_fromst...
@@ -827,22 +893,80 @@ def _real_extract(self, url): } -class CrunchyrollBetaShowIE(CrunchyrollBaseIE): +class CrunchyrollBetaShowIE(CrunchyrollBetaBaseIE): IE_NAME = 'crunchyroll:playlist:beta' - _VALID_URL = r'https?://beta\.crunchyroll\.com/(?P<lang>(?:\w{1,2}/)?)series/\w+/(?P<id>[\w\-]+)/?(?:\?...
yt_dlp/extractor/crunchyroll.py
26
Python
0.714
suggestion
109
27
959
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
if not self._get_cookies(url).get('etp_rt'): initial_state, app_config = self._get_beta_embedded_json(self._download_webpage(url, display_id), display_id) series_id = re.sub(r'-{2,}', '-', initial_state['content']['byId'][internal_id]['slug_title']) self.to_screen(f'{display_...
```suggestion for season in seasons_response['items']: episodes_response = self._download_json( f'{api_domain}/cms/v2{bucket}/episodes?season_id={season["id"]}', display_id, note=f'Retrieving episode list for {season.get("slug_title")}', query=para...
lang, internal_id, display_id = self._match_valid_url(url).group('lang', 'id', 'display_id') if not self._get_cookies(url).get('etp_rt'): return self._redirect_from_beta(url, lang, internal_id, display_id, False, CrunchyrollShowPlaylistIE.ie_key()) api_domain, bucket, params = self...
@@ -827,22 +890,75 @@ def _real_extract(self, url): } -class CrunchyrollBetaShowIE(CrunchyrollBaseIE): +class CrunchyrollBetaShowIE(CrunchyrollBetaBaseIE): IE_NAME = 'crunchyroll:playlist:beta' - _VALID_URL = r'https?://beta\.crunchyroll\.com/(?P<lang>(?:\w{1,2}/)?)series/\w+/(?P<id>[\w\-]+)/?(?:\?...
yt_dlp/extractor/crunchyroll.py
26
Python
0.786
suggestion
328
48
42
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
}, { 'url': 'https://beta.crunchyroll.com/it/series/GY19NQ2QR/Girl-Friend-BETA', 'only_matching': True, }] def _real_extract(self, url): lang, internal_id, display_id = self._match_valid_url(url).group('lang', 'id', 'display_id') if not self._get_cookies(url).get('etp_rt'):...
```suggestion seasons_response = self._download_json( f'{api_domain}/cms/v2{bucket}/seasons?series_id={internal_id}', display_id, note='Retrieving season list', query=params) ```
}, 'playlist_mincount': 10, }, { 'url': 'https://beta.crunchyroll.com/it/series/GY19NQ2QR/Girl-Friend-BETA', 'only_matching': True, }] def _real_extract(self, url): lang, internal_id, display_id = self._match_valid_url(url).group('lang', 'id', 'display_id') ...
@@ -827,22 +890,75 @@ def _real_extract(self, url): } -class CrunchyrollBetaShowIE(CrunchyrollBaseIE): +class CrunchyrollBetaShowIE(CrunchyrollBetaBaseIE): IE_NAME = 'crunchyroll:playlist:beta' - _VALID_URL = r'https?://beta\.crunchyroll\.com/(?P<lang>(?:\w{1,2}/)?)series/\w+/(?P<id>[\w\-]+)/?(?:\?...
yt_dlp/extractor/crunchyroll.py
26
Python
0.786
suggestion
214
51
50
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
'info_dict': { 'id': 'love-chunibyo-other-delusions-heart-throb-', 'title': 'Love, Chunibyo & Other Delusions - Heart Throb -', }, 'playlist_mincount': 10, }, { 'url': 'https://beta.crunchyroll.com/it/series/GY19NQ2QR/Girl-Friend-BETA', 'only_matching'...
```suggestion series_response = self._download_json( f'{api_domain}/cms/v2{bucket}/series/{internal_id}', display_id, note='Retrieving series metadata', query=params) ```
}, { 'url': 'https://beta.crunchyroll.com/series/GYJQV73V6/love-chunibyo--other-delusions---heart-throb--', 'info_dict': { 'id': 'love-chunibyo-other-delusions-heart-throb-', 'title': 'Love, Chunibyo & Other Delusions - Heart Throb -', }, 'playlist_mincount': ...
@@ -827,22 +890,75 @@ def _real_extract(self, url): } -class CrunchyrollBetaShowIE(CrunchyrollBaseIE): +class CrunchyrollBetaShowIE(CrunchyrollBetaBaseIE): IE_NAME = 'crunchyroll:playlist:beta' - _VALID_URL = r'https?://beta\.crunchyroll\.com/(?P<lang>(?:\w{1,2}/)?)series/\w+/(?P<id>[\w\-]+)/?(?:\?...
yt_dlp/extractor/crunchyroll.py
26
Python
0.786
suggestion
206
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
if season: current_season = season continue entries.append(self.url_result( f'http://www.crunchyroll.com{ep}', CrunchyrollIE.ie_key(), ep_id, season=current_season)) return { '_type': 'playlist', 'id': show_id, ...
```suggestion f'{api_domain}/auth/v1/token', None, note='Authenticating with cookie', ```
return { '_type': 'playlist', 'id': show_id, 'title': title, 'entries': reversed(entries), } class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): params = None def _get_params(self, lang): if not CrunchyrollBetaBaseIE.params: ini...
@@ -692,9 +717,43 @@ def _real_extract(self, url): } -class CrunchyrollBetaIE(CrunchyrollBaseIE): +class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): + params = None + + def _get_params(self, lang): + if not CrunchyrollBetaBaseIE.params: + initial_state, app_config = self._get_beta_emb...
yt_dlp/extractor/crunchyroll.py
26
Python
0.714
security
107
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
return { '_type': 'playlist', 'id': show_id, 'title': title, 'entries': reversed(entries), } class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): params = None def _get_params(self, lang): if not CrunchyrollBetaBaseIE.params: init...
```suggestion f'{api_domain}/index/v2', None, note='Retrieving signed policy', ```
} class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): params = None def _get_params(self, lang): if not CrunchyrollBetaBaseIE.params: initial_state, app_config = self._get_beta_embedded_json(self._download_webpage( f'https://beta.crunchyroll.com/{lang}', None, note='Re...
@@ -692,9 +717,43 @@ def _real_extract(self, url): } -class CrunchyrollBetaIE(CrunchyrollBaseIE): +class CrunchyrollBetaBaseIE(CrunchyrollBaseIE): + params = None + + def _get_params(self, lang): + if not CrunchyrollBetaBaseIE.params: + initial_state, app_config = self._get_beta_emb...
yt_dlp/extractor/crunchyroll.py
26
Python
0.714
suggestion
100
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
'referer': self._LOGIN_URL }) if upsell_response['code'] != 'ok': raise ExtractorError('Could not get session id') session_id = upsell_response['data']['session_id'] login_response = self._download_json( f'{self._API_BASE}/login.1.json', None,...
```suggestion initial_state = self._parse_json(self._search_regex( r'__INITIAL_STATE__\s*=\s*({.+?})\s*;', webpage, 'initial state'), display_id) app_config = self._parse_json(self._search_regex( r'__APP_CONFIG__\s*=\s*({.+?})\s*;', webpage, 'app config'), display_id) ```
'referer': self._LOGIN_URL }) if upsell_response['code'] != 'ok': raise ExtractorError('Could not get session id') session_id = upsell_response['data']['session_id'] login_response = self._download_json( f'{self._API_BASE}/login.1.json', None,...
@@ -86,6 +86,16 @@ def _perform_login(self, username, password): if not self._get_cookies(self._LOGIN_URL).get('etp_rt'): raise ExtractorError('Login succeeded but did not set etp_rt cookie') + # Beta-specific, but needed for redirects + def _get_beta_embedded_json(self, webpage, display_i...
yt_dlp/extractor/crunchyroll.py
26
Python
0.786
suggestion
317
51
51
false
[crunchyroll:playlist:beta] implement directly through beta api
2,955
yt-dlp/yt-dlp
132,642
Python
pukkandan
tejing1
}, { 'url': 'https://www.xinpianchang.com/a11762904', 'info_dict': { 'id': 'a11762904', 'ext': 'mp4', 'title': '冬奥会决胜时刻《法国派出三只鸡?》', 'description': 'md5:55cb139ef8f48f0c877932d1f196df8b', 'duration': 136, 'thumbnail': r're:^https...
```suggestion data = self._download_json(api, video_id=video_id)['data'] ```
'url': 'https://www.xinpianchang.com/a11762904', 'info_dict': { 'id': 'a11762904', 'ext': 'mp4', 'title': '冬奥会决胜时刻《法国派出三只鸡?》', 'description': 'md5:55cb139ef8f48f0c877932d1f196df8b', 'duration': 136, 'thumbnail': r're:^https?://oss-x...
@@ -0,0 +1,89 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + str_or_none, + try_get, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.571
suggestion
86
51
51
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
}, }, { 'url': 'https://www.xinpianchang.com/a11762904', 'info_dict': { 'id': 'a11762904', 'ext': 'mp4', 'title': '冬奥会决胜时刻《法国派出三只鸡?》', 'description': 'md5:55cb139ef8f48f0c877932d1f196df8b', 'duration': 136, 'thumbnail': ...
this is hard to read but okay, i personally don't mind. Try to see if than be made more readable
}, { 'url': 'https://www.xinpianchang.com/a11762904', 'info_dict': { 'id': 'a11762904', 'ext': 'mp4', 'title': '冬奥会决胜时刻《法国派出三只鸡?》', 'description': 'md5:55cb139ef8f48f0c877932d1f196df8b', 'duration': 136, 'thumbnail': r're:^https...
@@ -0,0 +1,89 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + str_or_none, + try_get, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.214
suggestion
97
51
51
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
'duration': 136, 'thumbnail': r're:^https?://oss-xpc0\.xpccdn\.com.+/assets/', 'uploader': '精品动画', 'uploader_id': 10858927, 'categories': ['动画', '三维CG'], 'keywords': ['France Télévisions', '法国3台', '蠢萌', '冬奥会'] }, }, { 'url': 'ht...
```suggestion for k, v in data.get('resource').items(): v_url = url_or_none(v.get('url')) if not v_url: continue if k == 'dash': formats.extend(self._extract_mpd_formats(v_url, video_id=video_id)) elif k == 'hls': ...
'thumbnail': r're:^https?://oss-xpc0\.xpccdn\.com.+/assets/', 'uploader': '精品动画', 'uploader_id': 10858927, 'categories': ['动画', '三维CG'], 'keywords': ['France Télévisions', '法国3台', '蠢萌', '冬奥会'] }, }, { 'url': 'https://www.xinpianchang.com/a1...
@@ -0,0 +1,89 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + str_or_none, + try_get, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.857
refactor
434
51
51
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
'uploader_id': 10858927, 'categories': ['动画', '三维CG'], 'keywords': ['France Télévisions', '法国3台', '蠢萌', '冬奥会'] }, }, { 'url': 'https://www.xinpianchang.com/a11779743?from=IndexPick&part=%E7%BC%96%E8%BE%91%E7%B2%BE%E9%80%89&index=2', 'only_matching': True, ...
Not sure if there's sanity check for format_id being none.... as of url, use url_or_none
'categories': ['动画', '三维CG'], 'keywords': ['France Télévisions', '法国3台', '蠢萌', '冬奥会'] }, }, { 'url': 'https://www.xinpianchang.com/a11779743?from=IndexPick&part=%E7%BC%96%E8%BE%91%E7%B2%BE%E9%80%89&index=2', 'only_matching': True, }] def _real_extract(self, u...
@@ -0,0 +1,89 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + str_or_none, + try_get, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.286
style
95
49
51
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
}, { 'url': 'https://www.xinpianchang.com/a11779743?from=IndexPick&part=%E7%BC%96%E8%BE%91%E7%B2%BE%E9%80%89&index=2', 'only_matching': True, }] def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id, fatal=False)...
```suggestion } if 'url' in prog for prog in v]) ```
'url': 'https://www.xinpianchang.com/a11779743?from=IndexPick&part=%E7%BC%96%E8%BE%91%E7%B2%BE%E9%80%89&index=2', 'only_matching': True, }] def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id=video_id) domain = self...
@@ -0,0 +1,89 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + str_or_none, + try_get, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.571
suggestion
70
45
51
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
}, { 'url': 'https://www.xinpianchang.com/a11762904', 'info_dict': { 'id': 'a11762904', 'ext': 'mp4', 'title': '冬奥会决胜时刻《法国派出三只鸡?》', 'description': 'md5:55cb139ef8f48f0c877932d1f196df8b', 'duration': 136, 'thumbnail': r're:^https...
```suggestion api = update_url_query(f'{domain}/mod/api/v2/media/{vid}', {'appKey': app_key})''' ``` import `update_url_query` from utils
'url': 'https://www.xinpianchang.com/a11762904', 'info_dict': { 'id': 'a11762904', 'ext': 'mp4', 'title': '冬奥会决胜时刻《法国派出三只鸡?》', 'description': 'md5:55cb139ef8f48f0c877932d1f196df8b', 'duration': 136, 'thumbnail': r're:^https?://oss-x...
@@ -0,0 +1,97 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import urllib.parse + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + try_get, + url_or_none, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.714
suggestion
150
51
51
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
Lesmiscore
hatienl0i2612
webpage = self._download_webpage(url, video_id=video_id) domain = self.find_value_with_regex(var='requireNewDomain', webpage=webpage) vid = self.find_value_with_regex(var='vid', webpage=webpage) app_key = self.find_value_with_regex(var='modeServerAppKey', webpage=webpage) api = u...
```suggestion } for prog in v if prog.get('url') or []]) ```
webpage = self._download_webpage(url, video_id=video_id) domain = self.find_value_with_regex(var='requireNewDomain', webpage=webpage) vid = self.find_value_with_regex(var='vid', webpage=webpage) app_key = self.find_value_with_regex(var='modeServerAppKey', webpage=webpage) api = u...
@@ -0,0 +1,96 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..utils import ( + int_or_none, + try_get, + update_url_query, + url_or_none, +) + + +class XinpianchangIE(InfoExtractor): + _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(...
yt_dlp/extractor/xinpianchang.py
26
Python
0.571
suggestion
78
46
45
false
[xinpianchang] Add extractor
2,963
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion 'subtitles': self.get_all_subtitles(video_id, stream_domain), ``` Much cleaner.
format_url = format_data.get('info') if not format_url: continue tbr = int_or_none(stream.get('filebitrate') or self._search_regex( r'_(\d+)_mp4/', format_url, 'tbr', default=None)) formats.append({ 'format_id': compat_str(t...
@@ -97,4 +129,23 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id=video_id, domain=stream_domain),
yt_dlp/extractor/mgtv.py
26
Python
0.714
suggestion
108
101
48
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion info = self._download_json(f'https://pcweb.api.mgtv.com/video/title?videoId={video_id}', video_id, fatal=False) or {} ```
r'_(\d+)_mp4/', format_url, 'tbr', default=None)) formats.append({ 'format_id': compat_str(tbr or idx), 'url': url_or_none(format_url), 'ext': 'mp4', 'tbr': tbr, 'protocol': 'm3u8_native', 'http_h...
@@ -97,4 +129,23 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id=video_id, domain=stream_domain), } + + def get_al...
yt_dlp/extractor/mgtv.py
26
Python
0.714
suggestion
145
101
44
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion sub = self._download_json(f'{domain}{url_sub}', video_id, note=f'Download subtitle for locale {sub.get("name")} ({locale})', fatal=False) ```
'Referer': url, }, 'format_note': stream.get('name'), }) self._sort_formats(formats) return { 'id': video_id, 'title': title, 'formats': formats, 'description': info.get('desc'), ...
@@ -97,4 +129,23 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id=video_id, domain=stream_domain), } + + def get_al...
yt_dlp/extractor/mgtv.py
26
Python
0.786
suggestion
247
101
36
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion sub_url = url_or_none((sub or {}).get('info')) if not sub_url: continue ```
return { 'id': video_id, 'title': title, 'formats': formats, 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), 'subtitles': self.extract_subtitles(video_id, stream_d...
@@ -97,4 +129,23 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id=video_id, domain=stream_domain), } + + def get_al...
yt_dlp/extractor/mgtv.py
26
Python
0.714
suggestion
133
101
31
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion subtitles.setdefault(locale or 'en', []).append({ 'url': sub_url, 'ext': 'srt' }) ```
return { 'id': video_id, 'title': title, 'formats': formats, 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), 'subtitles': self.extract_subtitles(video_id, stream_do...
@@ -97,4 +129,23 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id=video_id, domain=stream_domain), } + + def get_al...
yt_dlp/extractor/mgtv.py
26
Python
0.714
suggestion
191
101
30
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion locale = sub.get('captionCountrySimpleName') ```
'protocol': 'm3u8_native', 'http_headers': { 'Referer': url, }, 'format_note': stream.get('name'), }) self._sort_formats(formats) return { 'id': video_id, 'title': title, ...
@@ -97,4 +129,23 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id=video_id, domain=stream_domain), } + + def get_al...
yt_dlp/extractor/mgtv.py
26
Python
0.571
suggestion
76
101
38
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
Ashish0804
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion 'subtitles': self.extract_subtitles(video_id, stream_domain), } def _get_subtitles(self, video_id, domain): ```
tbr = int_or_none(stream.get('filebitrate') or self._search_regex( r'_(\d+)_mp4/', format_url, 'tbr', default=None)) formats.append({ 'format_id': compat_str(tbr or idx), 'url': url_or_none(format_url), 'ext': 'mp4', ...
@@ -97,4 +129,26 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id, stream_domain), } + + def get_all_subtitles(self...
yt_dlp/extractor/mgtv.py
26
Python
0.786
refactor
155
101
45
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion for sub in try_get(info, lambda x: x['data']['title']) or []: ```
'url': url_or_none(format_url), 'ext': 'mp4', 'tbr': tbr, 'protocol': 'm3u8_native', 'http_headers': { 'Referer': url, }, 'format_note': stream.get('name'), }) self._so...
@@ -97,4 +129,26 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id, stream_domain), } + + def get_all_subtitles(self...
yt_dlp/extractor/mgtv.py
26
Python
0.571
suggestion
89
101
41
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class MGTVIE(InfoExtractor): _VALID_URL = r'https?://(?:w(?:...
```suggestion sub = self._download_json(f'{domain}{url_sub}', video_id, note=f'Download subtitle for locale {sub.get("name")} ({locale})', fatal=False) or {} sub_url = url_or_none(sub.get('info')) if not...
return { 'id': video_id, 'title': title, 'formats': formats, 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), 'subtitles': self.extract_subtitles(video_id, stream_d...
@@ -97,4 +129,26 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.get_all_subtitles(video_id, stream_domain), } + + def get_all_subtitles(self...
yt_dlp/extractor/mgtv.py
26
Python
0.786
suggestion
360
101
31
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
'format_note': stream.get('name'), }) self._sort_formats(formats) return { 'id': video_id, 'title': title, 'formats': formats, 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), ...
```suggestion info = self._download_json(f'https://pcweb.api.mgtv.com/video/title?videoId={video_id}', video_id, fatal=False) or {} subtitles = {} for sub in try_get(info, lambda x: x['data']['title']) or []: url_sub = sub.get('url') ...
'format_note': stream.get('name'), }) self._sort_formats(formats) return { 'id': video_id, 'title': title, 'formats': formats, 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), ...
@@ -97,4 +129,26 @@ def _real_extract(self, url): 'description': info.get('desc'), 'duration': int_or_none(info.get('duration')), 'thumbnail': info.get('thumb'), + 'subtitles': self.extract_subtitles(video_id, stream_domain), } + + def _get_subtitles(self, v...
yt_dlp/extractor/mgtv.py
26
Python
0.786
suggestion
623
35
34
false
[MangoTV] Improve extractor
2,971
yt-dlp/yt-dlp
132,642
Python
pukkandan
hatienl0i2612
query=hidden_data) provider_login_url = "https://authorize.suddenlink.net/saml/module.php/authSynacor/login.php" + "?AuthState=" + provider_tryauth_page provider_login_page_res = self._download_webpage_handle( provider_login_url, v...
```suggestion provider_login_redirect_page, urlh = self._download_webpage_handle( urlh.geturl(), video_id, 'Sending First Bookend', query=hidden_data) provider_tryauth_url = self._html_search_regex( r'...
video_id, 'Getting Login Page', query=hidden_data) provider_association_redirect, urlh = post_form( provider_login_page_res, 'Logging in', { mso_info['username_field']: username, ...
@@ -1635,6 +1640,56 @@ def extract_redirect_url(html, url=None, fatal=False): urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) + post_form(mvpd_confirm_page_res, 'Confirming Login') + elif mso_id == 'Suddenlink': +...
yt_dlp/extractor/adobepass.py
26
Python
1
security
1,941
51
51
false
[adobepass] Add Suddenlink MSO
2,977
yt-dlp/yt-dlp
132,642
Python
pukkandan
CplPwnies
# but they also do a dynmaic redirect using javascript that has to be followed as well provider_redirect_page, urlh = provider_redirect_page_res provider_auth_redirect_res = post_form( provider_redirect_page_res, 'Pressing Continue...'...
```suggestion provider_login_page_res = self._download_webpage_handle( f'https://authorize.suddenlink.net/saml/module.php/authSynacor/login.php?AuthState={provider_tryauth_page}', video_id, 'Getting Login Page', query=hidden...
# but they also do a dynmaic redirect using javascript that has to be followed as well first_bookend_page, urlh = post_form( provider_redirect_page_res, 'Pressing Continue...') hidden_data = self._hidden_inputs(first_bookend_page) ...
@@ -1635,6 +1640,56 @@ def extract_redirect_url(html, url=None, fatal=False): urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) + post_form(mvpd_confirm_page_res, 'Confirming Login') + elif mso_id == 'Suddenlink': +...
yt_dlp/extractor/adobepass.py
26
Python
0.929
security
331
51
51
false
[adobepass] Add Suddenlink MSO
2,977
yt-dlp/yt-dlp
132,642
Python
pukkandan
CplPwnies
mso_info['password_field']: password }) provider_refresh_redirect_url = extract_redirect_url( provider_association_redirect, url=urlh.geturl()) last_bookend_page, urlh = self._download_webpage_handle( ...
```suggestion first_bookend_page, urlh = post_form( provider_redirect_page_res, 'Pressing Continue...') ```
mso_info['password_field']: password }) provider_refresh_redirect_url = extract_redirect_url( provider_association_redirect, url=urlh.geturl()) last_bookend_page, urlh = self._download_webpage_handle( ...
@@ -1635,6 +1640,56 @@ def extract_redirect_url(html, url=None, fatal=False): urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) + post_form(mvpd_confirm_page_res, 'Confirming Login') + elif mso_id == 'Suddenlink': +...
yt_dlp/extractor/adobepass.py
26
Python
0.714
suggestion
154
51
51
false
[adobepass] Add Suddenlink MSO
2,977
yt-dlp/yt-dlp
132,642
Python
pukkandan
CplPwnies
provider_refresh_redirect_url, video_id, 'Downloading Auth Association Redirect Page') hidden_data = self._hidden_inputs(last_bookend_page) hidden_data['history'] = 3 mvpd_confirm_page_res = self._download_webpa...
```suggestion provider_login_redirect_page, _ = self._download_webpage_handle( urlh.geturl(), video_id, 'Sending First Bookend', query=hidden_data) ``` urlh is unused?
provider_refresh_redirect_url, video_id, 'Downloading Auth Association Redirect Page') hidden_data = self._hidden_inputs(last_bookend_page) hidden_data['history'] = 3 mvpd_confirm_page_res = self._download_webpa...
@@ -1635,6 +1640,56 @@ def extract_redirect_url(html, url=None, fatal=False): urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) + post_form(mvpd_confirm_page_res, 'Confirming Login') + elif mso_id == 'Suddenlink': +...
yt_dlp/extractor/adobepass.py
26
Python
1
question
240
51
51
false
[adobepass] Add Suddenlink MSO
2,977
yt-dlp/yt-dlp
132,642
Python
pukkandan
CplPwnies
query=hidden_data) post_form(mvpd_confirm_page_res, 'Confirming Login') elif mso_id == 'Suddenlink': # Suddenlink is similar to SlingTV in using a tab history count and a meta refresh, # but they also do a dynmaic redir...
```suggestion provider_tryauth_page, _ = self._download_webpage_handle( provider_tryauth_url, video_id, 'Submitting TryAuth', query=hidden_data) ``` again
query=hidden_data) post_form(mvpd_confirm_page_res, 'Confirming Login') elif mso_id == 'Suddenlink': # Suddenlink is similar to SlingTV in using a tab history count and a meta refresh, # but they also do a dynmaic redir...
@@ -1635,6 +1640,56 @@ def extract_redirect_url(html, url=None, fatal=False): urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) + post_form(mvpd_confirm_page_res, 'Confirming Login') + elif mso_id == 'Suddenlink': +...
yt_dlp/extractor/adobepass.py
26
Python
0.929
security
227
51
51
false
[adobepass] Add Suddenlink MSO
2,977
yt-dlp/yt-dlp
132,642
Python
pukkandan
CplPwnies
hidden_data['history'] = 3 mvpd_confirm_page_res = self._download_webpage_handle( urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) post_form(mvpd_confirm_page_res, 'Confirming Login') ...
```suggestion provider_login_redirect_page = self._download_webpage( urlh.geturl(), video_id, 'Sending First Bookend', query=hidden_data) provider_tryauth_url = self._html_search_regex( r'url:\s*[\'"](...
hidden_data['history'] = 3 mvpd_confirm_page_res = self._download_webpage_handle( urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) post_form(mvpd_confirm_page_res, 'Confirming Login') ...
@@ -1635,6 +1640,52 @@ def extract_redirect_url(html, url=None, fatal=False): urlh.geturl(), video_id, 'Sending final bookend', query=hidden_data) + post_form(mvpd_confirm_page_res, 'Confirming Login') + elif mso_id == 'Suddenlink': +...
yt_dlp/extractor/adobepass.py
26
Python
0.786
security
570
51
51
false
[adobepass] Add Suddenlink MSO
2,977
yt-dlp/yt-dlp
132,642
Python
pukkandan
CplPwnies
return self.playlist_result( self._entries(channel_id, channel_name, self._TABS[tab]), f'{channel_id}-{tab}', f'{channel_name} - {tab.title()}', str_or_none(channel_info.get('description'))) # E.g.: rkfnsearch5:"\"zelenko\"" or rkfnsearch5:"\"mollie james\"" class RokfinSearchIE(Searc...
```suggestion video_id_ind, video_type = self._TYPES.get(traverse_obj(search_result, ('content_type', 'raw')), (None, None)) ``` `str_or_none` is not doing anything here
if not media_type or not video_id: continue yield self.url_result(f'https://rokfin.com/{media_type}/{video_id}', video_id=f'{media_type}/{video_id}', video_title=str_or_none(traverse_obj(content, ('content', 'contentTitle')))) class RokfinStac...
@@ -254,3 +257,64 @@ def _real_extract(self, url): return self.playlist_result( self._entries(channel_id, channel_name, self._TABS[tab]), f'{channel_id}-{tab}', f'{channel_name} - {tab.title()}', str_or_none(channel_info.get('description'))) + + +# E.g.: rkfnsearch5:"\"zelenko\"" or r...
yt_dlp/extractor/rokfin.py
26
Python
0.857
suggestion
188
51
51
false
[Rokfin] Search & login
2,992
yt-dlp/yt-dlp
132,642
Python
pukkandan
P-reducible
_SEARCH_KEY = 'rkfnsearch' _TYPES = { 'video': (('id', 'raw'), 'post'), 'audio': (('id', 'raw'), 'post'), 'stream': (("content_id", 'raw'), 'stream'), 'dead_stream': (('content_id', 'raw'), 'stream'), 'stack': (('content_id', 'raw'), 'stack'), } _ENTRIES_PER_PAGE ...
move this to `_real_initialize`
IE_DESC = 'Rokfin Stacks' _VALID_URL = r'https?://(?:www\.)?rokfin\.com/stack/(?P<id>[^/]+)' _TESTS = [{ 'url': 'https://www.rokfin.com/stack/271/Tulsi-Gabbard-Portsmouth-Townhall-FULL--Feb-9-2020', 'playlist_count': 8, 'info_dict': { 'id': '271', }, }] d...
@@ -254,3 +257,64 @@ def _real_extract(self, url): return self.playlist_result( self._entries(channel_id, channel_name, self._TABS[tab]), f'{channel_id}-{tab}', f'{channel_name} - {tab.title()}', str_or_none(channel_info.get('description'))) + + +# E.g.: rkfnsearch5:"\"zelenko\"" or r...
yt_dlp/extractor/rokfin.py
26
Python
0.286
refactor
31
51
51
false
[Rokfin] Search & login
2,992
yt-dlp/yt-dlp
132,642
Python
pukkandan
P-reducible