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
webpage = self._download_webpage(url, display_id) asset_id = str(self._search_nextjs_data(webpage, display_id)['props']['initialState']['livePage']['content']['asset_id']) livestream = self._download_json( 'https://apid.sky.it/vdp/v1/getLivestream', asset_id, query={'id':...
```suggestion 'params': {'skip_download': 'm3u8'}, ```
'https://apid.sky.it/vdp/v1/getLivestream', asset_id, query={'id': asset_id}) return self._parse_video(livestream, asset_id) class SkyItIE(SkyItPlayerIE): IE_NAME = 'sky.it' _VALID_URL = r'https?://(?:sport|tg24)\.sky\.it(?:/[^/]+)*/\d{4}/\d{2}/\d{2}/(?P<id>[^/?&#]+)' _TEST...
@@ -132,15 +134,20 @@ class SkyItIE(SkyItPlayerIE): IE_NAME = 'sky.it' _VALID_URL = r'https?://(?:sport|tg24)\.sky\.it(?:/[^/]+)*/\d{4}/\d{2}/\d{2}/(?P<id>[^/?&#]+)' _TESTS = [{ - 'url': 'https://sport.sky.it/calcio/serie-a/2020/11/21/juventus-cagliari-risultato-gol', + 'url': 'https://spor...
yt_dlp/extractor/skyit.py
26
Python
0.571
suggestion
64
51
51
false
[extractor/skyit] Various fixes and cleanups
5,442
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
'title': 'Brozovic con il gruppo: verso convocazione per Juve-Inter', 'upload_date': '20221103', 'timestamp': 1667484130, 'duration': 22, 'thumbnail': 'https://videoplatform.sky.it/still/2022/11/03/1667480526353_brozovic_videostill_1.jpg', }, '...
```suggestion 'params': {'skip_download': 'm3u8'}, ```
'duration': 22, 'thumbnail': 'https://videoplatform.sky.it/still/2022/11/03/1667480526353_brozovic_videostill_1.jpg', }, 'params': {'skip_download': 'm3u8'}, }, { 'url': 'https://tg24.sky.it/mondo/2020/11/22/australia-squalo-uccide-uomo', 'md5': 'fe5c91e59a84a...
@@ -150,6 +157,12 @@ class SkyItIE(SkyItPlayerIE): 'title': 'Uomo ucciso da uno squalo in Australia', 'timestamp': 1606036192, 'upload_date': '20201122', + 'duration': 26, + 'thumbnail': 'https://video.sky.it/captures/thumbs/631227/631227_thumb_880x494.jpg', ...
yt_dlp/extractor/skyit.py
26
Python
0.571
suggestion
64
51
51
false
[extractor/skyit] Various fixes and cleanups
5,442
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
display_id = self._match_id(url) webpage = self._download_webpage(url, display_id) video_id = self._search_regex( self._VIDEO_ID_REGEX, webpage, 'video id') return self._player_url_result(video_id) class SkyItArteIE(SkyItIE): IE_NAME = 'arte.sky.it' _VALID_URL = r'h...
```suggestion 'params': {'skip_download': 'm3u8'}, ```
_VALID_URL = r'https?://arte\.sky\.it/video/(?P<id>[^/?&#]+)' _TESTS = [{ 'url': 'https://arte.sky.it/video/oliviero-toscani-torino-galleria-mazzoleni-788962', 'md5': '515aee97b87d7a018b6c80727d3e7e17', 'info_dict': { 'id': '788962', 'ext': 'mp4', 'tit...
@@ -162,40 +175,28 @@ def _real_extract(self, url): return self._player_url_result(video_id) -class SkyItAcademyIE(SkyItIE): - IE_NAME = 'skyacademy.it' - _VALID_URL = r'https?://(?:www\.)?skyacademy\.it(?:/[^/]+)*/\d{4}/\d{2}/\d{2}/(?P<id>[^/?&#]+)' - _TESTS = [{ - 'url': 'https://www.skya...
yt_dlp/extractor/skyit.py
26
Python
0.571
suggestion
64
51
51
false
[extractor/skyit] Various fixes and cleanups
5,442
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
'skip_download': True, }, }] _DOMAIN = 'skyarte' _VIDEO_ID_REGEX = r'"embedUrl"\s*:\s*"(?:https:)?//player\.sky\.it/player/external\.html\?[^"]*\bid=(\d+)' class CieloTVItIE(SkyItIE): IE_NAME = 'cielotv.it' _VALID_URL = r'https?://(?:www\.)?cielotv\.it/video/(?P<id>[^.]+)\.html...
```suggestion 'params': {'skip_download': 'm3u8'}, ```
'md5': 'c4deed77552ba901c2a0d9258320304b', 'info_dict': { 'id': '499240', 'ext': 'mp4', 'title': 'Il lunedì è sempre un dramma', 'upload_date': '20190329', 'timestamp': 1553862178, 'duration': 30, 'thumbnail': 'https://v...
@@ -210,24 +211,36 @@ class CieloTVItIE(SkyItIE): 'title': 'Il lunedì è sempre un dramma', 'upload_date': '20190329', 'timestamp': 1553862178, - } + 'duration': 30, + 'thumbnail': 'https://videoplatform.sky.it/still/2019/03/29/1553858575610_lunedi_dram...
yt_dlp/extractor/skyit.py
26
Python
0.571
suggestion
64
51
35
false
[extractor/skyit] Various fixes and cleanups
5,442
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
'skip_download': True, }, }] _DOMAIN = 'cielo' _VIDEO_ID_REGEX = r'videoId\s*=\s*"(\d+)"' class TV8ItIE(SkyItVideoIE): IE_NAME = 'tv8.it' _VALID_URL = r'https?://(?:www\.)?tv8\.it/(?:show)?video/[0-9a-z-]+-(?P<id>\d+)' _TESTS = [{ 'url': 'https://www.tv8.it/video/og...
```suggestion 'params': {'skip_download': 'm3u8'}, ```
from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_parse_urlparse, ) from ..utils import ( dict_get, int_or_none, parse_duration, unified_timestamp, ) class SkyItPlayerIE(InfoExtractor): IE_NAME = 'player.sky.it' _VALID_URL = r'https?://player\.sky\...
@@ -210,24 +211,36 @@ class CieloTVItIE(SkyItIE): 'title': 'Il lunedì è sempre un dramma', 'upload_date': '20190329', 'timestamp': 1553862178, - } + 'duration': 30, + 'thumbnail': 'https://videoplatform.sky.it/still/2019/03/29/1553858575610_lunedi_dram...
yt_dlp/extractor/skyit.py
26
Python
0.571
suggestion
64
29
229
false
[extractor/skyit] Various fixes and cleanups
5,442
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
"""Whether there is an update available""" return version_tuple(__version__) < version_tuple(self.new_version) @functools.cached_property def filename(self): """Filename of the executable""" return compat_realpath(_get_variant_and_executable_path()[1]) def _download(self, n...
make these distinguishable in _get_variant_and_executable_path
return self._get_version_info(self._tag)['tag_name'] @property def latest_version(self): """Version of the latest release""" return self._get_version_info('latest')['tag_name'] @property def has_update(self): """Whether there is an update available""" return ver...
@@ -162,8 +162,12 @@ def _download(self, name, tag): def release_name(self): """The release filename""" label = _FILE_SUFFIXES[detect_variant()] - if label and platform.architecture()[0][:2] == '32': - label = f'_x86{label}' + if label: + machine = platform.mac...
yt_dlp/update.py
26
Python
0.214
suggestion
62
51
51
false
Add armv7 & aarch64 build artifacts to the build workflow
5,449
yt-dlp/yt-dlp
132,642
Python
pukkandan
MrOctopus
@property def has_update(self): """Whether there is an update available""" return version_tuple(__version__) < version_tuple(self.new_version) @functools.cached_property def filename(self): """Filename of the executable""" return compat_realpath(_get_variant_and_executa...
This should specifically look for `arm7l`. Any other architecture should give the "unofficial build" message
"""Version of the latest release we can update to""" if self._tag.startswith('tags/'): return self._tag[5:] return self._get_version_info(self._tag)['tag_name'] @property def latest_version(self): """Version of the latest release""" return self._get_version_i...
@@ -164,8 +164,8 @@ def release_name(self): label = _FILE_SUFFIXES[detect_variant()] if label: machine = platform.machine().lower() - if machine == 'aarch64' or machine.startswith("arm"): - label = f'_{machine}{label}' + if machine == 'aarch64' or mach...
yt_dlp/update.py
26
Python
0.571
suggestion
108
51
51
false
Add armv7 & aarch64 build artifacts to the build workflow
5,449
yt-dlp/yt-dlp
132,642
Python
pukkandan
MrOctopus
video_id = self._match_id(url) user_id = 'guest_%u' % random.randrange(10000, 99999) webpage = self._download_webpage(url, video_id, headers=self.geo_verification_headers()) data = self._download_json( f'https://camsoda.com/api/v1/video/vtoken/{video_id}?username={user_id}',...
```suggestion if data.get('private_servers'): raise ExtractorError(self._ROOM_PRIVATE, expected=True) elif not data.get('stream_name'): raise ExtractorError(self._ROOM_OFFLINE, expected=True) token = traverse_obj(data, 'token', expected_type=str) ...
data = self._download_json( f'https://camsoda.com/api/v1/video/vtoken/{video_id}', video_id, query={'username': f'guest_{random.randrange(10000, 99999)}'}, headers=self.geo_verification_headers()) if not data: raise ExtractorError('Unable to find configura...
@@ -0,0 +1,63 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' + _TESTS = [{ + 'url': 'https://www.camsoda.com/lizzhopf', + 'info_dict': { +...
yt_dlp/extractor/camsoda.py
26
Python
1
refactor
638
39
35
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
'age_limit': 18, }, 'skip': 'Room is offline', }] _ROOM_OFFLINE = 'Model is offline.' _ROOM_PRIVATE = 'Model is in private show.' def _real_extract(self, url): video_id = self._match_id(url) user_id = 'guest_%u' % random.randrange(10000, 99999) webpa...
shouldnt these checks be done only if there is no format?
'age_limit': 18, }, 'skip': 'Room is offline', }] def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id, headers=self.geo_verification_headers()) data = self._download_json( f'https://camsoda....
@@ -0,0 +1,63 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' + _TESTS = [{ + 'url': 'https://www.camsoda.com/lizzhopf', + 'info_dict': { +...
yt_dlp/extractor/camsoda.py
26
Python
0.286
question
57
48
44
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
data = self._download_json( f'https://camsoda.com/api/v1/video/vtoken/{video_id}?username={user_id}', video_id, headers=self.geo_verification_headers()) if not data: raise ExtractorError('Unable to find configuration for stream.') if data.get('private_servers...
why is title=id? This also doesnt match test
f'https://camsoda.com/api/v1/video/vtoken/{video_id}', video_id, query={'username': f'guest_{random.randrange(10000, 99999)}'}, headers=self.geo_verification_headers()) if not data: raise ExtractorError('Unable to find configuration for stream.') elif data...
@@ -0,0 +1,57 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' + _TESTS = [{ + 'url': 'https://www.camsoda.com/lizzhopf', + 'info_dict': { +...
yt_dlp/extractor/camsoda.py
26
Python
0.071
question
44
32
34
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
_VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf', 'ext': 'mp4', 'title': 'lizzhopf (lizzhopf) Nude on Cam. Free Live Sex Chat Room - CamSoda', 'd...
```suggestion elif data.get('private_servers'): ```
_VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[\w-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf', 'ext': 'mp4', 'title': 'lizzhopf (lizzhopf) Nude on Cam. Free Live Sex Chat Room - CamSoda', 'descript...
@@ -0,0 +1,57 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' + _TESTS = [{ + 'url': 'https://www.camsoda.com/lizzhopf', + 'info_dict': { +...
yt_dlp/extractor/camsoda.py
26
Python
0.571
suggestion
61
51
51
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
import random from .common import InfoExtractor from ..utils import ExtractorError, traverse_obj class CamsodaIE(InfoExtractor): _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf',...
```suggestion _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[\w-]+)' ```
import random from .common import InfoExtractor from ..utils import ExtractorError, traverse_obj class CamsodaIE(InfoExtractor): _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[\w-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf', ...
@@ -0,0 +1,57 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)'
yt_dlp/extractor/camsoda.py
8
Python
0.571
suggestion
81
33
33
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
from ..utils import ExtractorError, traverse_obj class CamsodaIE(InfoExtractor): _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf', 'ext': 'mp4', 'title': '...
```suggestion webpage = self._download_webpage(url, video_id, headers=self.geo_verification_headers()) data = self._download_json( f'https://camsoda.com/api/v1/video/vtoken/{video_id}', video_id, query={'username': f'guest_{random.randrange(10000, 99999)}', hea...
from ..utils import ExtractorError, traverse_obj class CamsodaIE(InfoExtractor): _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[\w-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf', 'ext': 'mp4', 'title': 'lizzhop...
@@ -0,0 +1,57 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' + _TESTS = [{ + 'url': 'https://www.camsoda.com/lizzhopf', + 'info_dict': { +...
yt_dlp/extractor/camsoda.py
26
Python
0.857
suggestion
362
51
51
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
import random from .common import InfoExtractor from ..utils import ExtractorError, traverse_obj class CamsodaIE(InfoExtractor): _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf',...
is it worth downloading webpage just for description?
import random from .common import InfoExtractor from ..utils import ExtractorError, traverse_obj class CamsodaIE(InfoExtractor): _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[\w-]+)' _TESTS = [{ 'url': 'https://www.camsoda.com/lizzhopf', 'info_dict': { 'id': 'lizzhopf', ...
@@ -0,0 +1,57 @@ +import random + +from .common import InfoExtractor +from ..utils import ExtractorError, traverse_obj + + +class CamsodaIE(InfoExtractor): + _VALID_URL = r'https?://www\.camsoda\.com/(?P<id>[0-9A-Za-z-]+)' + _TESTS = [{ + 'url': 'https://www.camsoda.com/lizzhopf', + 'info_dict': { +...
yt_dlp/extractor/camsoda.py
24
Python
0.214
question
53
49
49
false
[camsoda] Add extractor
5,465
yt-dlp/yt-dlp
132,642
Python
pukkandan
zulaport
for url in urls: try: response = self._request_webpage( HEADRequest(url), video_id=video_id, note=f'Checking {url}', headers=self._HEADERS) except ExtractorError as e: self.to_screen(f'{video_id}: URL is invalid, skipping: {e.cause}') ...
use `self.raise_geo_restricted` You may also want to set `_GEO_BYPASS = False`
}] _GEO_BYPASS = False _HEADERS = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.57 Safari/537.36', 'Referer': 'https://www.bitchute.com/', } def _check_format(self, video_url, video_id): urls = order...
@@ -74,11 +86,19 @@ def _check_format(self, video_url, video_id): 'filesize': int_or_none(response.headers.get('Content-Length')) } + @staticmethod + def _raise_if_restricted(webpage): + page_title = clean_html(get_element_by_class('page-title', webpage)) + if page_ti...
yt_dlp/extractor/bitchute.py
26
Python
0.429
suggestion
81
51
51
false
[bitchute] raise on restricted videos
5,474
yt-dlp/yt-dlp
132,642
Python
pukkandan
flashdagger
re.sub(r'(^https?://)(seed\d+)(?=\.bitchute\.com)', fr'\g<1>{host}', video_url) for host in (r'\g<2>', 'seed150', 'seed151', 'seed152', 'seed153')) for url in urls: try: response = self._request_webpage( HEADRequest(url), video_id=video_id,...
```suggestion page_title = clean_html(get_element_by_class('page-title', webpage)) or '' if re.fullmatch(r'(?:Channel|Video) Restricted', page_title): ```
'url': 'https://www.bitchute.com/torrent/Zee5BE49045h/szoMrox2JEI.webtorrent', 'only_matching': True, }] _GEO_BYPASS = False _HEADERS = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.57 Safari/537.36', ...
@@ -74,11 +86,19 @@ def _check_format(self, video_url, video_id): 'filesize': int_or_none(response.headers.get('Content-Length')) } + @staticmethod + def _raise_if_restricted(webpage): + page_title = clean_html(get_element_by_class('page-title', webpage)) + if page_ti...
yt_dlp/extractor/bitchute.py
26
Python
0.714
suggestion
173
51
51
false
[bitchute] raise on restricted videos
5,474
yt-dlp/yt-dlp
132,642
Python
pukkandan
flashdagger
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
```suggestion _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?P<id>\d+))(?!/list/)' ```
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
@@ -312,6 +315,44 @@ def _real_extract(self, url): return self.playlist_result(entries, playlist_id) +class HotStarSeasonIE(HotStarBaseIE): + IE_NAME = 'hotstar:season' + _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)' + _TESTS = [{ + ...
yt_dlp/extractor/hotstar.py
26
Python
0.714
suggestion
119
51
51
false
[extractor/hotstar] Add season support
5,479
yt-dlp/yt-dlp
132,642
Python
bashonly
m4tu4g
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
```suggestion _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?P<id>\d+))(?!.*/list/)' ```
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
@@ -312,9 +315,47 @@ def _real_extract(self, url): return self.playlist_result(entries, playlist_id) +class HotStarSeasonIE(HotStarBaseIE): + IE_NAME = 'hotstar:season' + _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)' + _TESTS = [{ + ...
yt_dlp/extractor/hotstar.py
26
Python
0.714
suggestion
121
51
51
false
[extractor/hotstar] Add season support
5,479
yt-dlp/yt-dlp
132,642
Python
bashonly
m4tu4g
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
```suggestion _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?P<id>\d+))/?(?:[#?].*)?$' ```
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
@@ -312,9 +315,47 @@ def _real_extract(self, url): return self.playlist_result(entries, playlist_id) +class HotStarSeasonIE(HotStarBaseIE): + IE_NAME = 'hotstar:season' + _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)' + _TESTS = [{ + ...
yt_dlp/extractor/hotstar.py
26
Python
0.714
suggestion
123
51
51
false
[extractor/hotstar] Add season support
5,479
yt-dlp/yt-dlp
132,642
Python
bashonly
m4tu4g
'timestamp': 1567525674, 'upload_date': '20190903', 'duration': 10787, 'episode': 'Nuvvu Naaku Nachav', }, }, { 'url': 'hotstar:episode:1000234847', 'only_matching': True, }, { # contentData 'url': 'hotstar:sports:1260065956...
```suggestion _VALID_URL = r'https?://(?:www\.)?hotstar\.com(?:/in)?/tv(?:/[^/]+){2}/list/[^/]+/t-(?P<id>\w+)' ```
'timestamp': 1567525674, 'upload_date': '20190903', 'duration': 10787, 'episode': 'Nuvvu Naaku Nachav', }, }, { 'url': 'hotstar:episode:1000234847', 'only_matching': True, }, { # contentData 'url': 'hotstar:sports:1260065956...
@@ -289,7 +289,7 @@ def _real_extract(self, url): class HotStarPlaylistIE(HotStarBaseIE): IE_NAME = 'hotstar:playlist' - _VALID_URL = r'https?://(?:www\.)?hotstar\.com/tv/[^/]+/s-\w+/list/[^/]+/t-(?P<id>\w+)' + _VALID_URL = r'https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?:s-)?\w+/list/[^/]+/t-(?P<id>...
yt_dlp/extractor/hotstar.py
26
Python
0.714
suggestion
120
51
51
false
[extractor/hotstar] Add season support
5,479
yt-dlp/yt-dlp
132,642
Python
pukkandan
m4tu4g
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
```suggestion _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?P<id>\d+))/?(?:[#?]|$)' ```
}, { 'url': 'https://www.hotstar.com/in/tv/bigg-boss/14714/seasons/season-4/ss-8208/', 'info_dict': { 'id': '8208', }, 'playlist_mincount': 19, }] def _real_extract(self, url): url, season_id = self._match_valid_url(url).groups() headers = { ...
@@ -312,9 +315,47 @@ def _real_extract(self, url): return self.playlist_result(entries, playlist_id) +class HotStarSeasonIE(HotStarBaseIE): + IE_NAME = 'hotstar:season' + _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)' + _TESTS = [{ + ...
yt_dlp/extractor/hotstar.py
26
Python
0.714
suggestion
121
51
51
false
[extractor/hotstar] Add season support
5,479
yt-dlp/yt-dlp
132,642
Python
pukkandan
m4tu4g
'url': 'https://www.philo.com', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/3533 'url': 'https://www.mech-plus.com/', 'only_matching': True, }, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # htt...
```suggestion return r'https?://(?:www\.)?(?:%s)' % '|'.join(rf'(?:{s})' for s in cls.UNSUPPORTED_URLS) ```
'url': 'https://www.philo.com', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/3533 'url': 'https://www.mech-plus.com/', 'only_matching': True, }, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # htt...
@@ -0,0 +1,93 @@ +from .common import InfoExtractor +from ..utils import classproperty, ExtractorError + + +class KnownDRMIE(InfoExtractor): + IE_DESC = False + IE_NAME = 'unsupported:drm' + UNSUPPORTED_URLS = ( + r'play\.hbomax\.com', + r'channel(?:4|5)\.com', + r'peacocktv\.com', + ...
yt_dlp/extractor/unsupported.py
26
Python
0.714
suggestion
117
33
33
false
[extractor/unsupported] Add extractor
5,483
yt-dlp/yt-dlp
132,642
Python
Lesmiscore
coletdjnz
from .common import InfoExtractor from ..utils import classproperty, ExtractorError class KnownDRMIE(InfoExtractor): IE_DESC = False IE_NAME = 'unsupported:drm' UNSUPPORTED_URLS = ( r'play\.hbomax\.com', r'channel(?:4|5)\.com', r'peacocktv\.com', r'([a-zA-Z0-9_\.]+\.)?disne...
```suggestion r'(?:[\w\.]+\.)?disneyplus\.com', ```
from .common import InfoExtractor from ..utils import classproperty, ExtractorError class KnownDRMIE(InfoExtractor): IE_DESC = False IE_NAME = 'unsupported:drm' UNSUPPORTED_URLS = ( r'play\.hbomax\.com', r'channel(?:4|5)\.com', r'peacocktv\.com', r'(?:[\w\.]+\.)?disneyplus\...
@@ -0,0 +1,93 @@ +from .common import InfoExtractor +from ..utils import classproperty, ExtractorError + + +class KnownDRMIE(InfoExtractor): + IE_DESC = False + IE_NAME = 'unsupported:drm' + UNSUPPORTED_URLS = ( + r'play\.hbomax\.com', + r'channel(?:4|5)\.com', + r'peacocktv\.com', + ...
yt_dlp/extractor/unsupported.py
12
Python
0.571
suggestion
61
37
37
false
[extractor/unsupported] Add extractor
5,483
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
from .common import InfoExtractor from ..utils import classproperty, ExtractorError class KnownDRMIE(InfoExtractor): IE_DESC = False IE_NAME = 'unsupported:drm' UNSUPPORTED_URLS = ( r'play\.hbomax\.com', r'channel(?:4|5)\.com', r'peacocktv\.com', r'([a-zA-Z0-9_\.]+\.)?disne...
```suggestion r'(?:[\w\.]+\.)?mech-plus\.com', ```
from .common import InfoExtractor from ..utils import classproperty, ExtractorError class KnownDRMIE(InfoExtractor): IE_DESC = False IE_NAME = 'unsupported:drm' UNSUPPORTED_URLS = ( r'play\.hbomax\.com', r'channel(?:4|5)\.com', r'peacocktv\.com', r'(?:[\w\.]+\.)?disneyplus\...
@@ -0,0 +1,93 @@ +from .common import InfoExtractor +from ..utils import classproperty, ExtractorError + + +class KnownDRMIE(InfoExtractor): + IE_DESC = False + IE_NAME = 'unsupported:drm' + UNSUPPORTED_URLS = ( + r'play\.hbomax\.com', + r'channel(?:4|5)\.com', + r'peacocktv\.com', + ...
yt_dlp/extractor/unsupported.py
18
Python
0.571
suggestion
60
43
43
false
[extractor/unsupported] Add extractor
5,483
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
}, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/2934 'url': 'https://www.aha.video', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/2743 'url': 'https://mubi.com',...
maybe we should change all DRM errors to some variant of this? (no need in this PR)
}, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/2934 'url': 'https://www.aha.video', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/2743 'url': 'https://mubi.com',...
@@ -0,0 +1,93 @@ +from .common import InfoExtractor +from ..utils import classproperty, ExtractorError + + +class KnownDRMIE(InfoExtractor): + IE_DESC = False + IE_NAME = 'unsupported:drm' + UNSUPPORTED_URLS = ( + r'play\.hbomax\.com', + r'channel(?:4|5)\.com', + r'peacocktv\.com', + ...
yt_dlp/extractor/unsupported.py
26
Python
0.429
suggestion
84
27
27
false
[extractor/unsupported] Add extractor
5,483
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
'url': 'https://www.philo.com', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/3533 'url': 'https://www.mech-plus.com/', 'only_matching': True, }, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # htt...
```suggestion return rf'https?://(?:www\.)?(?:{"|".join(cls.UNSUPPORTED_URLS)})' ``` The extra brackets do nothing
'url': 'https://www.philo.com', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/3533 'url': 'https://www.mech-plus.com/', 'only_matching': True, }, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # htt...
@@ -0,0 +1,93 @@ +from .common import InfoExtractor +from ..utils import classproperty, ExtractorError + + +class KnownDRMIE(InfoExtractor): + IE_DESC = False + IE_NAME = 'unsupported:drm' + UNSUPPORTED_URLS = ( + r'play\.hbomax\.com', + r'channel(?:4|5)\.com', + r'peacocktv\.com', + ...
yt_dlp/extractor/unsupported.py
26
Python
0.714
suggestion
125
33
33
false
[extractor/unsupported] Add extractor
5,483
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
'url': 'https://www.philo.com', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/3533 'url': 'https://www.mech-plus.com/', 'only_matching': True, }, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # htt...
This could be simplified to: ```py _VALID_URL = r'https?://(?:www\.)?(?:%s)' % '|'.join(( r'play\.hbomax\.com', ... )) ```
'url': 'https://www.philo.com', 'only_matching': True, }, { # https://github.com/yt-dlp/yt-dlp/issues/3533 'url': 'https://www.mech-plus.com/', 'only_matching': True, }, { 'url': 'https://watch.mech-plus.com/', 'only_matching': True, }, { # htt...
@@ -0,0 +1,93 @@ +from .common import InfoExtractor +from ..utils import classproperty, ExtractorError + + +class KnownDRMIE(InfoExtractor): + IE_DESC = False + IE_NAME = 'unsupported:drm' + UNSUPPORTED_URLS = ( + r'play\.hbomax\.com', + r'channel(?:4|5)\.com', + r'peacocktv\.com', + ...
yt_dlp/extractor/unsupported.py
26
Python
0.786
suggestion
152
33
33
false
[extractor/unsupported] Add extractor
5,483
yt-dlp/yt-dlp
132,642
Python
pukkandan
coletdjnz
class RumbleIE(InfoExtractor): _VALID_URL = r'''(?x) https?://(?:www\.)?rumble\.com/ (?P<id>v # ids start with v (?!ideos) # exclude https://rumble.com/videos [0-9a-zA-Z]{4,} # video page identifier (case insensitive) (?:-[^&?#$/]*)? # usually fo...
I have noticed u do this in many PRs https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#long-lines-policy ```suggestion 'description': 'Moose the dog is more than happy to help with digging out this epic snow fort. Great job, Moose!', ``` or even better, use md5
class RumbleIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rumble\.com/(?P<id>v(?!ideos)[\w.-]+)[^/]*$' _EMBED_REGEX = [r'<a class=video-item--a href=(?P<url>/v[\w.-]+\.html)>'] _TESTS = [{ 'add_ie': ['RumbleEmbed'], 'url': 'https://rumble.com/vdmum1-moose-the-dog-helps-girls-dig-a-sn...
@@ -236,6 +222,96 @@ def _real_extract(self, url): } +class RumbleIE(InfoExtractor): + _VALID_URL = r'''(?x) + https?://(?:www\.)?rumble\.com/ + (?P<id>v # ids start with v + (?!ideos) # exclude https://rumble.com/videos + [0-9a-zA-Z]{4,} # video page...
yt_dlp/extractor/rumble.py
26
Python
0.857
suggestion
288
51
51
false
[rumble] add dedicated RumbleIE extractor class
5,515
yt-dlp/yt-dlp
132,642
Python
pukkandan
flashdagger
}, { 'url': 'https://rumble.com/live-videos', 'playlist_mincount': 19, 'info_dict': { 'id': 'live-videos', 'title': 'Live Videos', 'description': 'Live videos on Rumble.com', 'age_limit': 0, }, }, { 'url': 'https://rumble.co...
```suggestion try: url_info = next(RumbleEmbedIE.extract_from_webpage(self._downloader, url, webpage)) ```
}, { 'url': 'https://rumble.com/search/video?q=rumble&sort=views', 'playlist_count': 24, 'info_dict': { 'id': 'video?q=rumble&sort=views', 'title': 'Search results for: rumble', 'age_limit': 0, }, }] def _real_extract(self, url): p...
@@ -236,6 +222,96 @@ def _real_extract(self, url): } +class RumbleIE(InfoExtractor): + _VALID_URL = r'''(?x) + https?://(?:www\.)?rumble\.com/ + (?P<id>v # ids start with v + (?!ideos) # exclude https://rumble.com/videos + [0-9a-zA-Z]{4,} # video page...
yt_dlp/extractor/rumble.py
26
Python
0.786
refactor
129
51
51
false
[rumble] add dedicated RumbleIE extractor class
5,515
yt-dlp/yt-dlp
132,642
Python
pukkandan
flashdagger
'info_dict': { 'id': 'live-videos', 'title': 'Live Videos', 'description': 'Live videos on Rumble.com', 'age_limit': 0, }, }, { 'url': 'https://rumble.com/search/video?q=rumble&sort=views', 'playlist_count': 24, 'info_dict': { ...
why not just return url_transparent?
'info_dict': { 'id': 'video?q=rumble&sort=views', 'title': 'Search results for: rumble', 'age_limit': 0, }, }] def _real_extract(self, url): page_id = self._match_id(url) webpage = self._download_webpage(url, page_id) url_info = next(R...
@@ -236,6 +222,96 @@ def _real_extract(self, url): } +class RumbleIE(InfoExtractor): + _VALID_URL = r'''(?x) + https?://(?:www\.)?rumble\.com/ + (?P<id>v # ids start with v + (?!ideos) # exclude https://rumble.com/videos + [0-9a-zA-Z]{4,} # video page...
yt_dlp/extractor/rumble.py
26
Python
0.071
question
36
51
51
false
[rumble] add dedicated RumbleIE extractor class
5,515
yt-dlp/yt-dlp
132,642
Python
pukkandan
flashdagger
return { 'id': video_id, 'title': unescapeHTML(video.get('title')), 'formats': formats, 'subtitles': subtitles, 'thumbnails': thumbnails, 'timestamp': parse_iso8601(video.get('pubDate')), 'channel': author.get('name'), ...
Isn't this better? ```suggestion _VALID_URL = r'https?://(?:www\.)?rumble\.com/(?!videos)(?P<id>v\w+)[^/]*$' ```
return { 'id': video_id, 'title': unescapeHTML(video.get('title')), 'formats': formats, 'subtitles': subtitles, 'thumbnails': thumbnails, 'timestamp': parse_iso8601(video.get('pubDate')), 'channel': author.get('name'), ...
@@ -236,6 +222,96 @@ def _real_extract(self, url): } +class RumbleIE(InfoExtractor): + _VALID_URL = r'''(?x) + https?://(?:www\.)?rumble\.com/ + (?P<id>v # ids start with v + (?!ideos) # exclude https://rumble.com/videos + [0-9a-zA-Z]{4,} # video page...
yt_dlp/extractor/rumble.py
26
Python
0.786
question
121
51
51
false
[rumble] add dedicated RumbleIE extractor class
5,515
yt-dlp/yt-dlp
132,642
Python
pukkandan
flashdagger
if new_url == urllib.parse.urlparse(url)._replace(scheme='https').geturl(): url = new_url elif url != new_url: self.report_following_redirect(new_url) if force_videoid: new_url = smuggle_url(new_url, {'force_videoid': force_videoid}) return...
```suggestion info_dict.update(self._hls_segment_query(url)) ``` same everywhere
elif url != new_url: self.report_following_redirect(new_url) if force_videoid: new_url = smuggle_url(new_url, {'force_videoid': force_videoid}) return self.url_result(new_url) info_dict = { 'id': video_id, 'title': self._generi...
@@ -2608,6 +2617,8 @@ def _real_extract(self, url): subtitles = {} if format_id.endswith('mpegurl'): formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers) + if self._hls_segment_query(url): + info...
yt_dlp/extractor/generic.py
26
Python
0.571
suggestion
99
51
51
false
Add `fragment_query` generic extractor arg for DASH and native HLS
5,528
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
} } ] def report_following_redirect(self, new_url): """Report information extraction.""" self._downloader.to_screen('[redirect] Following redirect to %s' % new_url) def report_detected(self, name, num=1, note=None): if num > 1: name += 's' el...
```suggestion if self._configuration_arg('hls_segment_query'): query_string = urllib.parse.urlparse(url).query if query_string: return {'extra_param_to_segment_url': query_string} return {} ```
} } ] def report_following_redirect(self, new_url): """Report information extraction.""" self._downloader.to_screen('[redirect] Following redirect to %s' % new_url) def report_detected(self, name, num=1, note=None): if num > 1: name += 's' el...
@@ -2446,6 +2446,15 @@ def report_detected(self, name, num=1, note=None): self._downloader.write_debug(f'Identified {num} {name}{format_field(note, None, "; %s")}') + def _hls_segment_query(self, url): + if self._configuration_arg('hls_segment_query', ie_key=GenericIE): + query_string ...
yt_dlp/extractor/generic.py
26
Python
0.786
suggestion
255
51
51
false
Add `fragment_query` generic extractor arg for DASH and native HLS
5,528
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
'uploader': 'boniek61', 'thumbnail': r're:^https?://.*\.jpg$', 'duration': 5554, 'age_limit': 18, 'view_count': int, 'average_rating': float, }, }, { 'url': 'http://ebd.cda.pl/0x0/5749950c', 'only_matching': True, }]...
better to modify `Cache._get_cache_fn` instead. We can use some encoding to force everything into ascii
'uploader': 'boniek61', 'thumbnail': r're:^https?://.*\.jpg$', 'duration': 5554, 'age_limit': 18, 'view_count': int, 'average_rating': float, }, }, { 'url': 'http://ebd.cda.pl/0x0/5749950c', 'only_matching': True, }]...
@@ -101,7 +101,9 @@ def _download_age_confirm_page(self, url, video_id, *args, **kwargs): }, **kwargs) def _perform_login(self, username, password): - cached_bearer = self.cache.load(self._BEARER_CACHE, username) or {} + # hack to allow e-mails as a key + cache_username = userna...
yt_dlp/extractor/cda.py
26
Python
0.571
performance
103
51
51
false
[cda] premium content downloading, fix login by e-mail, reduce followed redirects for web
5,529
yt-dlp/yt-dlp
132,642
Python
pukkandan
selfisekai
video_id = self._match_id(url) if 'Authorization' in self._API_HEADERS: return self._api_extract(video_id) else: return self._web_extract(video_id, url) def _api_extract(self, video_id): meta = self._download_json( f'{self._BASE_API_URL}/video/{v...
```suggestion if meta.get('premium') and not meta.get('premium_free') and not formats: raise ExtractorError( 'No video formats and video requires CDA Premium - do you have a subscription?', expected=True) ```
'vivo Y33s', )) self._API_HEADERS['User-Agent'] = f'pl.cda 1.0 (version {app_version}; Android {android_version}; {phone_model})' cached_bearer = self.cache.load(self._BEARER_CACHE, username) or {} if cached_bearer.get('valid_until', 0) > datetime.datetime.now().timestamp() ...
@@ -153,6 +152,10 @@ def _api_extract(self, video_id): self._sort_formats(formats) + if meta.get('premium') and not meta.get('premium_free') and len(formats) == 0: + raise ExtractorError( + 'No video formats and video requires CDA Premium - do you have a subscription?', exp...
yt_dlp/extractor/cda.py
26
Python
1
refactor
248
51
51
false
[cda] premium content downloading, fix login by e-mail, reduce followed redirects for web
5,529
yt-dlp/yt-dlp
132,642
Python
pukkandan
selfisekai
}) self._API_HEADERS['Authorization'] = f'Bearer {token_res["access_token"]}' def _real_extract(self, url): video_id = self._match_id(url) if 'Authorization' in self._API_HEADERS: return self._api_extract(video_id) else: return self._web_extract(vide...
```suggestion ``` merge conflict should disappear
'Xiaomi Redmi Note 11S 5G', 'Xiaomi Redmi Note 11S', 'realme 10', 'realme 9 Pro+', 'vivo Y33s', )) self._API_HEADERS['User-Agent'] = f'pl.cda 1.0 (version {app_version}; Android {android_version}; {phone_model})' cached_bearer = self.c...
@@ -153,6 +152,10 @@ def _api_extract(self, video_id): self._sort_formats(formats)
yt_dlp/extractor/cda.py
26
Python
0.643
suggestion
51
51
51
false
[cda] premium content downloading, fix login by e-mail, reduce followed redirects for web
5,529
yt-dlp/yt-dlp
132,642
Python
pukkandan
selfisekai
'uploader_id': 'NewsflareBreaking', 'channel_url': 'https://www.youtube.com/channel/UCzSSoloGEz10HALUAbYhngQ', 'description': 'md5:99b21d9cea59330149efbd9706e208f5', 'age_limit': 0, 'channel_id': 'UCzSSoloGEz10HALUAbYhngQ', 'uploader_url': 'http://...
Not this? ```suggestion formats.append({'url': source.get('src'), 'ext': ext}) ```
'channel_follower_count': int, 'like_count': int, 'uploader': 'Newsflare', 'thumbnail': 'https://i.ytimg.com/vi_webp/2ZTqmpee-bQ/maxresdefault.webp', 'availability': 'public', 'title': 'Geese Chase Alligator Across Golf Course', 'upload...
@@ -0,0 +1,88 @@ +from .common import InfoExtractor +from .youtube import YoutubeIE +from ..utils import determine_ext, int_or_none, parse_iso8601, traverse_obj + + +class AirTVIE(InfoExtractor): + _VALID_URL = r'https?://www\.air\.tv/watch\?v=(?P<id>\w+)' + _TESTS = [{ + # without youtube_id + 'url...
yt_dlp/extractor/airtv.py
26
Python
0.714
suggestion
101
51
51
false
[extractor/airtv] Add extractor
5,533
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
} }] def _get_formats_and_subtitle(self, json_data, video_id): formats, subtitles = [], {} for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...): ext = determine_ext(source.get('src')) if ext == 'm3u8': fmts, subs = self._extrac...
```suggestion formats, subtitles = self._get_formats_and_subtitle(nextjs_json, display_id) return { ```
'categories': ['News & Politics'], 'live_status': 'not_live', 'playable_in_embed': True, 'channel': 'Newsflare', 'duration': 37, 'upload_date': '20180511', } }] def _get_formats_and_subtitle(self, json_data, video_id): form...
@@ -0,0 +1,88 @@ +from .common import InfoExtractor +from .youtube import YoutubeIE +from ..utils import determine_ext, int_or_none, parse_iso8601, traverse_obj + + +class AirTVIE(InfoExtractor): + _VALID_URL = r'https?://www\.air\.tv/watch\?v=(?P<id>\w+)' + _TESTS = [{ + # without youtube_id + 'url...
yt_dlp/extractor/airtv.py
26
Python
0.714
suggestion
124
39
47
false
[extractor/airtv] Add extractor
5,533
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
if ext == 'm3u8': fmts, subs = self._extract_m3u8_formats_and_subtitles(source.get('src'), video_id) formats.extend(fmts) self._merge_subtitles(subs, target=subtitles) else: formats.append({'url': source.get('src'), 'ext': 'mp4'}) ...
```suggestion 'thumbnails': [{'url': thumbnail} for thumbnail in traverse_obj(nextjs_json, ('default_thumbnails', ...)], ```
}] def _get_formats_and_subtitle(self, json_data, video_id): formats, subtitles = [], {} for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...): ext = determine_ext(source.get('src'), mimetype2ext(source.get('type'))) if ext == 'm3u8': f...
@@ -0,0 +1,88 @@ +from .common import InfoExtractor +from .youtube import YoutubeIE +from ..utils import determine_ext, int_or_none, parse_iso8601, traverse_obj + + +class AirTVIE(InfoExtractor): + _VALID_URL = r'https?://www\.air\.tv/watch\?v=(?P<id>\w+)' + _TESTS = [{ + # without youtube_id + 'url...
yt_dlp/extractor/airtv.py
26
Python
0.714
suggestion
138
32
40
false
[extractor/airtv] Add extractor
5,533
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
fmts, subs = self._extract_m3u8_formats_and_subtitles(source.get('src'), video_id) formats.extend(fmts) self._merge_subtitles(subs, target=subtitles) else: formats.append({'url': source.get('src'), 'ext': 'mp4'}) return formats, subtitl...
```suggestion 'channel_id': traverse_obj(nextjs_json, 'channel', 'channel_slug'), ```
def _get_formats_and_subtitle(self, json_data, video_id): formats, subtitles = [], {} for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...): ext = determine_ext(source.get('src'), mimetype2ext(source.get('type'))) if ext == 'm3u8': fmts, su...
@@ -0,0 +1,88 @@ +from .common import InfoExtractor +from .youtube import YoutubeIE +from ..utils import determine_ext, int_or_none, parse_iso8601, traverse_obj + + +class AirTVIE(InfoExtractor): + _VALID_URL = r'https?://www\.air\.tv/watch\?v=(?P<id>\w+)' + _TESTS = [{ + # without youtube_id + 'url...
yt_dlp/extractor/airtv.py
26
Python
0.571
suggestion
99
31
39
false
[extractor/airtv] Add extractor
5,533
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...): ext = determine_ext(source.get('src')) if ext == 'm3u8': fmts, subs = self._extract_m3u8_formats_and_subtitles(source.get('src'), video_id) formats.extend(fmts) self....
```suggestion 'description': nextjs_json.get('description') or None, ```
'upload_date': '20180511', } }] def _get_formats_and_subtitle(self, json_data, video_id): formats, subtitles = [], {} for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...): ext = determine_ext(source.get('src'), mimetype2ext(source.get('type'))...
@@ -0,0 +1,88 @@ +from .common import InfoExtractor +from .youtube import YoutubeIE +from ..utils import determine_ext, int_or_none, parse_iso8601, traverse_obj + + +class AirTVIE(InfoExtractor): + _VALID_URL = r'https?://www\.air\.tv/watch\?v=(?P<id>\w+)' + _TESTS = [{ + # without youtube_id + 'url...
yt_dlp/extractor/airtv.py
26
Python
0.571
suggestion
86
34
42
false
[extractor/airtv] Add extractor
5,533
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
if ext == 'm3u8': fmts, subs = self._extract_m3u8_formats_and_subtitles(source.get('src'), video_id) formats.extend(fmts) self._merge_subtitles(subs, target=subtitles) else: formats.append({'url': source.get('src'), 'ext': 'mp4'}) ...
```suggestion 'thumbnails': [ {'url': thumbnail} for thumbnail in traverse_obj(nextjs_json, ('default_thumbnails', ...))], ```
}] def _get_formats_and_subtitle(self, json_data, video_id): formats, subtitles = [], {} for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...): ext = determine_ext(source.get('src'), mimetype2ext(source.get('type'))) if ext == 'm3u8': f...
@@ -0,0 +1,88 @@ +from .common import InfoExtractor +from .youtube import YoutubeIE +from ..utils import determine_ext, int_or_none, parse_iso8601, traverse_obj + + +class AirTVIE(InfoExtractor): + _VALID_URL = r'https?://www\.air\.tv/watch\?v=(?P<id>\w+)' + _TESTS = [{ + # without youtube_id + 'url...
yt_dlp/extractor/airtv.py
26
Python
0.714
suggestion
174
32
40
false
[extractor/airtv] Add extractor
5,533
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
'id': '2584466013', 'ext': 'mp3', 'title': 'Mastodon - Hail to Fire', 'thumbnail': r're:^https?://.*\.jpg$', 'uploader': 'Mastodon', 'timestamp': 1322005399, 'upload_date': '20111122', 'release_timestamp': 1076112000, ...
```suggestion r'<h3 class="albumTitle">[^>]*by\s*<span>\s*<a href="[^>]+">\s*([^>]+?)\s*</a>', ```
'artist': 'Ben Prunty', 'album_artist': 'Ben Prunty', 'album': 'FTL: Advanced Edition Soundtrack', 'uploader_url': 'https://benprunty.bandcamp.com', 'uploader_id': 'benprunty', }, }, { # no free download, mp3 128 'url': 'https://rel...
@@ -84,6 +84,11 @@ def _extract_data_attr(self, webpage, video_id, attr='tralbum', fatal=True): r'data-%s=(["\'])({.+?})\1' % attr, webpage, attr + ' data', group=2), video_id, fatal=fatal) + def _extract_album_artist(self, webpage, fatal=False): + return self._html_search_regex( +...
yt_dlp/extractor/bandcamp.py
26
Python
0.714
suggestion
112
51
51
false
[extractor/bandcamp] Add album_artist metadata (#5536)
5,537
yt-dlp/yt-dlp
132,642
Python
pukkandan
stelcodes
'ext': 'mp3', 'title': 'Mastodon - Hail to Fire', 'thumbnail': r're:^https?://.*\.jpg$', 'uploader': 'Mastodon', 'timestamp': 1322005399, 'upload_date': '20111122', 'release_timestamp': 1076112000, 'release_date': '20040207'...
```suggestion webpage, 'album artist', fatal=False) ```
'album_artist': 'Ben Prunty', 'album': 'FTL: Advanced Edition Soundtrack', 'uploader_url': 'https://benprunty.bandcamp.com', 'uploader_id': 'benprunty', }, }, { # no free download, mp3 128 'url': 'https://relapsealumni.bandcamp.com/track/hail-t...
@@ -84,6 +84,11 @@ def _extract_data_attr(self, webpage, video_id, attr='tralbum', fatal=True): r'data-%s=(["\'])({.+?})\1' % attr, webpage, attr + ' data', group=2), video_id, fatal=fatal) + def _extract_album_artist(self, webpage, fatal=False): + return self._html_search_regex( +...
yt_dlp/extractor/bandcamp.py
26
Python
0.571
suggestion
69
51
51
false
[extractor/bandcamp] Add album_artist metadata (#5536)
5,537
yt-dlp/yt-dlp
132,642
Python
pukkandan
stelcodes
'ext': 'mp3', 'title': 'Mastodon - Hail to Fire', 'thumbnail': r're:^https?://.*\.jpg$', 'uploader': 'Mastodon', 'timestamp': 1322005399, 'upload_date': '20111122', 'release_timestamp': 1076112000, 'release_date': '20040207'...
This does not need to be a function
'album_artist': 'Ben Prunty', 'album': 'FTL: Advanced Edition Soundtrack', 'uploader_url': 'https://benprunty.bandcamp.com', 'uploader_id': 'benprunty', }, }, { # no free download, mp3 128 'url': 'https://relapsealumni.bandcamp.com/track/hail-t...
@@ -84,6 +84,11 @@ def _extract_data_attr(self, webpage, video_id, attr='tralbum', fatal=True): r'data-%s=(["\'])({.+?})\1' % attr, webpage, attr + ' data', group=2), video_id, fatal=fatal) + def _extract_album_artist(self, webpage, fatal=False): + return self._html_search_regex( +...
yt_dlp/extractor/bandcamp.py
26
Python
0.071
suggestion
35
51
51
false
[extractor/bandcamp] Add album_artist metadata (#5536)
5,537
yt-dlp/yt-dlp
132,642
Python
pukkandan
stelcodes
if f['vcodec'] != 'none' and quality in f['url']: http_url = '%s%s.mp4' % (self._HOST, quality) urlh = self._request_webpage( HEADRequest(http_url), quality, note='Check filesize', fatal=False) if urlh: ...
In the source page `akamaihd.net/i` is just used as a fake placeholder URI that will be replaced with the real one according to the logic reported below. Thus I wouldn't match this URI since it has high chance to be changed in the future. Instead I would match the url that ends with m3u8. ``` self._search_regex(r'...
'description': 'Il gol di Lindsey Thomas | Fiorentina vs Milan | Serie A Calcio Femminile', 'thumbnail': 're:^https?://.*', 'upload_date': '20221126', 'formats': 'count:8', }, }, { 'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189...
@@ -63,7 +63,7 @@ def _real_extract(self, url): url = '%s//%s' % (self.http_scheme(), url) webpage = self._download_webpage(url, video_id) - video_path = self._search_regex(r'(/content/.*?).mp4', webpage, 'video_path') + video_path = self._search_regex(r'akamaihd\.net/i(?:/,)?(/con...
yt_dlp/extractor/la7.py
26
Python
0.857
suggestion
2,421
51
51
false
[extractor/la7] fix #5360 + drm check
5,538
yt-dlp/yt-dlp
132,642
Python
ael-code
nixxo
if f['vcodec'] != 'none' and quality in f['url']: http_url = '%s%s.mp4' % (self._HOST, quality) urlh = self._request_webpage( HEADRequest(http_url), quality, note='Check filesize', fatal=False) if urlh: ...
Also I would avoid matching blank spaces since this is a URL. ```suggestion video_path = self._search_regex(r'akamaihd\.net/i(?:/,)?(/content/\S*?)\.mp4', webpage, 'video_path') ```
'description': 'Il gol di Lindsey Thomas | Fiorentina vs Milan | Serie A Calcio Femminile', 'thumbnail': 're:^https?://.*', 'upload_date': '20221126', 'formats': 'count:8', }, }, { 'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189...
@@ -63,7 +63,7 @@ def _real_extract(self, url): url = '%s//%s' % (self.http_scheme(), url) webpage = self._download_webpage(url, video_id) - video_path = self._search_regex(r'(/content/.*?).mp4', webpage, 'video_path') + video_path = self._search_regex(r'akamaihd\.net/i(?:/,)?(/con...
yt_dlp/extractor/la7.py
26
Python
0.786
suggestion
194
51
51
false
[extractor/la7] fix #5360 + drm check
5,538
yt-dlp/yt-dlp
132,642
Python
ael-code
nixxo
http_url = '%s%s.mp4' % (self._HOST, quality) urlh = self._request_webpage( HEADRequest(http_url), quality, note='Check filesize', fatal=False) if urlh: http_f = f.copy() del http_f['manifest...
```suggestion if self._search_regex( r'(?i)(drmsupport\s*:\s*true)\s*', webpage, video_id, default=None): ``` or even just re.search is fine here ```suggestion if re.search(r'(?i)(drmsupport\s*:\s*true)\s*', webpage): ```
'thumbnail': 're:^https?://.*', 'upload_date': '20221126', 'formats': 'count:8', }, }, { 'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189077', 'only_matching': True, }] _HOST = 'https://awsvodpkg.iltrovatore.it' def _gen...
@@ -58,12 +60,15 @@ def _generate_mp4_url(self, quality, m3u8_formats): def _real_extract(self, url): video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) - if not url.startswith('http'): - url = '%s//%s' % (self.http_scheme(), url) + if self...
yt_dlp/extractor/la7.py
26
Python
0.786
suggestion
260
51
51
false
[extractor/la7] fix #5360 + drm check
5,538
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
note='Check filesize', fatal=False) if urlh: http_f = f.copy() del http_f['manifest_url'] http_f.update({ 'format_id': http_f['format_id'].replace('hls-', 'https-'), 'url': htt...
isn't `\S` too broad? ig it's better than previous code
}, { 'url': 'http://www.la7.it/omnibus/rivedila7/omnibus-news-02-07-2016-189077', 'only_matching': True, }] _HOST = 'https://awsvodpkg.iltrovatore.it' def _generate_mp4_url(self, quality, m3u8_formats): for f in m3u8_formats: if f['vcodec'] != 'none' and quality in f...
@@ -58,12 +60,15 @@ def _generate_mp4_url(self, quality, m3u8_formats): def _real_extract(self, url): video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) - if not url.startswith('http'): - url = '%s//%s' % (self.http_scheme(), url) + if self...
yt_dlp/extractor/la7.py
26
Python
0.429
question
55
51
51
false
[extractor/la7] fix #5360 + drm check
5,538
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
def _real_extract(self, url): video_id = self._match_id(url) if not url.startswith('http'): url = '%s//%s' % (self.http_scheme(), url) webpage = self._download_webpage(url, video_id) video_path = self._search_regex(r'(/content/.*?).mp4', webpage, 'video_path') ...
```suggestion ``` This is deprecated
note='Check filesize', fatal=False) if urlh: http_f = f.copy() del http_f['manifest_url'] http_f.update({ 'format_id': http_f['format_id'].replace('hls-', 'https-'), 'url': htt...
@@ -74,9 +79,7 @@ def _real_extract(self, url): formats.extend(m3u8_formats) for q in filter(None, video_path.split(',')): - http_f = self._generate_mp4_url(q, m3u8_formats) - if http_f: - formats.append(http_f) + formats.append(self._generate_mp4_url(...
yt_dlp/extractor/la7.py
26
Python
0.429
suggestion
38
51
51
false
[extractor/la7] fix #5360 + drm check
5,538
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
return None def _real_extract(self, url): video_id = self._match_id(url) if not url.startswith('http'): url = '%s//%s' % (self.http_scheme(), url) webpage = self._download_webpage(url, video_id) video_path = self._search_regex(r'(/content/.*?).mp4', web...
There must have been some reason for the `if`. Don't remove it unless u r sure
urlh = self._request_webpage( HEADRequest(http_url), quality, note='Check filesize', fatal=False) if urlh: http_f = f.copy() del http_f['manifest_url'] http_f.update({ ...
@@ -74,9 +79,7 @@ def _real_extract(self, url): formats.extend(m3u8_formats) for q in filter(None, video_path.split(',')): - http_f = self._generate_mp4_url(q, m3u8_formats) - if http_f: - formats.append(http_f) + formats.append(self._generate_mp4_url(...
yt_dlp/extractor/la7.py
26
Python
0.429
suggestion
78
51
51
false
[extractor/la7] fix #5360 + drm check
5,538
yt-dlp/yt-dlp
132,642
Python
pukkandan
nixxo
from .common import InfoExtractor from ..utils import clean_html class OnePlacePodcastIE(InfoExtractor): _VALID_URL = r'https?://www\.oneplace\.com/[\w]+/[^/]+/listen/[\w-]+-(?P<id>\d+)' _TESTS = [{ 'url': 'https://www.oneplace.com/ministries/a-daily-walk/listen/living-in-the-last-days-part-2-958461.h...
```suggestion media_url = self._search_regex(( r'mp3-url\s*=\s*"([^"]+)', r'<div[^>]+id\s*=\s*"player"[^>]+data-media-url\s*=\s*"(?P<media_url>[^"]+)', ), webpage, 'media url') ```
from .common import InfoExtractor class OnePlacePodcastIE(InfoExtractor): _VALID_URL = r'https?://www\.oneplace\.com/[\w]+/[^/]+/listen/[\w-]+-(?P<id>\d+)' _TESTS = [{ 'url': 'https://www.oneplace.com/ministries/a-daily-walk/listen/living-in-the-last-days-part-2-958461.html', 'info_dict': { ...
@@ -0,0 +1,35 @@ +from .common import InfoExtractor +from ..utils import clean_html + + +class OnePlacePodcastIE(InfoExtractor): + _VALID_URL = r'https?://www\.oneplace\.com/[\w]+/[^/]+/listen/[\w-]+-(?P<id>\d+)' + _TESTS = [{ + 'url': 'https://www.oneplace.com/ministries/a-daily-walk/listen/living-in-the-...
yt_dlp/extractor/oneplace.py
23
Python
0.786
suggestion
225
36
44
false
[extractor/oneplace] Add OnePlacePodcast extractor
5,549
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
'info_dict': { 'id': '958461', 'ext': 'mp3', 'title': 'Living in the Last Days Part 2 | A Daily Walk with John Randall', 'description': 'md5:fbb8f1cf21447ac54ecaa2887fc20c6e', } }] def _real_extract(self, url): video_id = self._match_valid...
```suggestion 'ext': 'mp3', 'vcodec': 'none', ```
'id': '958461', 'ext': 'mp3', 'title': 'Living in the Last Days Part 2 | A Daily Walk with John Randall', 'description': 'md5:fbb8f1cf21447ac54ecaa2887fc20c6e', } }, { 'url': 'https://www.oneplace.com/ministries/ankerberg-show/listen/ep-3-relying-on-th...
@@ -0,0 +1,35 @@ +from .common import InfoExtractor +from ..utils import clean_html + + +class OnePlacePodcastIE(InfoExtractor): + _VALID_URL = r'https?://www\.oneplace\.com/[\w]+/[^/]+/listen/[\w-]+-(?P<id>\d+)' + _TESTS = [{ + 'url': 'https://www.oneplace.com/ministries/a-daily-walk/listen/living-in-the-...
yt_dlp/extractor/oneplace.py
26
Python
0.571
suggestion
76
28
36
false
[extractor/oneplace] Add OnePlacePodcast extractor
5,549
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
'info_dict': { 'id': '958461', 'ext': 'mp3', 'title': 'Living in the Last Days Part 2 | A Daily Walk with John Randall', 'description': 'md5:fbb8f1cf21447ac54ecaa2887fc20c6e', } }] def _real_extract(self, url): video_id = self._match_valid...
```suggestion r'<div[^>]+class="[^"]+epDesc"[^>]*>\s*(?P<desc>.+)', webpage, 'description', default=None)) ``` default implies non-fatal
'id': '958461', 'ext': 'mp3', 'title': 'Living in the Last Days Part 2 | A Daily Walk with John Randall', 'description': 'md5:fbb8f1cf21447ac54ecaa2887fc20c6e', } }, { 'url': 'https://www.oneplace.com/ministries/ankerberg-show/listen/ep-3-relying-on-th...
@@ -0,0 +1,35 @@ +from .common import InfoExtractor +from ..utils import clean_html + + +class OnePlacePodcastIE(InfoExtractor): + _VALID_URL = r'https?://www\.oneplace\.com/[\w]+/[^/]+/listen/[\w-]+-(?P<id>\d+)' + _TESTS = [{ + 'url': 'https://www.oneplace.com/ministries/a-daily-walk/listen/living-in-the-...
yt_dlp/extractor/oneplace.py
26
Python
0.714
suggestion
155
28
36
false
[extractor/oneplace] Add OnePlacePodcast extractor
5,549
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
except ExtractorError as e: if last_error: raise last_error if not isinstance(e.cause, urllib.error.HTTPError) or e.cause.code != 404: raise last_error = e self.report_warnin...
~~it looks to me like this line is unreachable~~ See other comment
except ExtractorError as e: if last_error: raise last_error if not isinstance(e.cause, urllib.error.HTTPError) or e.cause.code != 404: raise last_error = e self.report_warnin...
@@ -107,46 +107,56 @@ def _call_api(self, path, video_id, query={}, graphql=False): 'x-twitter-active-user': 'yes', }) - result, last_error = None, None + last_error = None for bearer_token in self._TOKENS: - headers['Authorization'] = f'Bearer {bearer_t...
yt_dlp/extractor/twitter.py
26
Python
0.214
suggestion
66
51
51
false
[extractor/twitter] Refresh guest token when expired
5,560
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
raise ExtractorError('Could not retrieve guest token') headers['x-guest-token'] = self._TOKENS[bearer_token] try: allowed_status = {400, 403, 404} if graphql else {403} result = self._download_json( ...
shouldn't we save this to last error and re-raise it instead of "Failed to call API"
raise ExtractorError('Could not retrieve guest token') headers['x-guest-token'] = self._TOKENS[bearer_token] try: allowed_status = {400, 403, 404} if graphql else {403} result = self._download_json( ...
@@ -107,46 +107,56 @@ def _call_api(self, path, video_id, query={}, graphql=False): 'x-twitter-active-user': 'yes', }) - result, last_error = None, None + last_error = None for bearer_token in self._TOKENS: - headers['Authorization'] = f'Bearer {bearer_t...
yt_dlp/extractor/twitter.py
26
Python
0.429
bug
84
51
51
false
[extractor/twitter] Refresh guest token when expired
5,560
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
'width': int(m.group('width')), 'height': int(m.group('height')), }) @functools.cached_property def is_logged_in(self): return bool(self._get_cookies(self._API_BASE).get('auth_token')) def _call_api(self, path, video_id, query={}, graphql=False): ...
```suggestion for first_attempt in (True, False): ```
'width': int(m.group('width')), 'height': int(m.group('height')), }) @functools.cached_property def is_logged_in(self): return bool(self._get_cookies(self._API_BASE).get('auth_token')) def _call_api(self, path, video_id, query={}, graphql=False): ...
@@ -107,46 +107,54 @@ def _call_api(self, path, video_id, query={}, graphql=False): 'x-twitter-active-user': 'yes', }) - result, last_error = None, None + last_error = None for bearer_token in self._TOKENS: - headers['Authorization'] = f'Bearer {bearer_t...
yt_dlp/extractor/twitter.py
26
Python
0.571
suggestion
67
51
51
false
[extractor/twitter] Refresh guest token when expired
5,560
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
from .common import InfoExtractor from .dailymotion import DailymotionIE from ..utils import smuggle_url, traverse_obj class NetverseBaseIE(InfoExtractor): _ENDPOINTS = { 'watch': 'watchvideo', 'video': 'watchvideo', 'webseries': 'webseries', 'season': 'webseason_videos', } ...
does this page have no comments?
import itertools from .common import InfoExtractor from .dailymotion import DailymotionIE from ..utils import smuggle_url, traverse_obj class NetverseBaseIE(InfoExtractor): _ENDPOINTS = { 'watch': 'watchvideo', 'video': 'watchvideo', 'webseries': 'webseries', 'season': 'webseason_...
@@ -16,6 +16,26 @@ def _call_api(self, slug, endpoint, query={}, season_id='', display_id=None): f'https://api.netverse.id/medias/api/v2/{self._ENDPOINTS[endpoint]}/{slug}/{season_id}', display_id or slug, query=query) + def _get_comments(self, video_id): + comment_json = self._dow...
yt_dlp/extractor/netverse.py
22
Python
0.071
question
32
47
47
false
[extractor/netverse] Add capabilites to extract comment
5,568
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
'upload_date': '20220225', }, 'skip': 'This video get Geo-blocked for some country' }, { # video with comments 'url': 'https://netverse.id/video/episode-1-season-2016-ok-food', 'info_dict': { 'id': 'k6hetBPiQMljSxxvAy7', 'ext': 'mp4', ...
Add `'params': {'getcomments': True}` so that comment download actually runs
'uploader': 'Net Prime', 'timestamp': 1645764984, 'upload_date': '20220225', }, 'skip': 'This video get Geo-blocked for some country' }, { # video with comments 'url': 'https://netverse.id/video/episode-1-season-2016-ok-food', 'info_dict': ...
@@ -114,6 +134,52 @@ class NetverseIE(NetverseBaseIE): 'upload_date': '20220225', }, 'skip': 'This video get Geo-blocked for some country' + }, { + # video with comments + 'url': 'https://netverse.id/video/episode-1-season-2016-ok-food', + 'info_dict': { + ...
yt_dlp/extractor/netverse.py
26
Python
0.357
suggestion
76
51
51
false
[extractor/netverse] Add capabilites to extract comment
5,568
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
return self._download_json( f'https://api.netverse.id/medias/api/v2/{self._ENDPOINTS[endpoint]}/{slug}/{season_id}', display_id or slug, query=query) def _get_comments(self, video_id): comment_json = self._download_json( f'https://api.netverse.id/mediadetails/api...
```suggestion last_page_number = None for i in itertools.count(1): comment_data = self._download_json( f'https://api.netverse.id/mediadetails/api/v3/videos/comments/{video_id}', video_id, data=b'', fatal=False, query={'page': i}, note='Do...
def _call_api(self, slug, endpoint, query={}, season_id='', display_id=None): return self._download_json( f'https://api.netverse.id/medias/api/v2/{self._ENDPOINTS[endpoint]}/{slug}/{season_id}', display_id or slug, query=query) def _get_comments(self, video_id): last_pa...
@@ -16,6 +16,28 @@ def _call_api(self, slug, endpoint, query={}, season_id='', display_id=None): f'https://api.netverse.id/medias/api/v2/{self._ENDPOINTS[endpoint]}/{slug}/{season_id}', display_id or slug, query=query) + def _get_comments(self, video_id): + comment_json = self._dow...
yt_dlp/extractor/netverse.py
26
Python
0.857
security
968
51
51
false
[extractor/netverse] Add capabilites to extract comment
5,568
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
# coding: utf-8 from __future__ import unicode_literals from datetime import datetime import re import time from .common import InfoExtractor from ..utils import ( ExtractorError, url_or_none, traverse_obj, ) class Kanal2IE(InfoExtractor): SUBTITLE_DATE_RE = re.compile(r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:...
unnecessary ```suggestion ```
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals
yt_dlp/extractor/kanal2.py
2
Python
0.429
suggestion
31
27
27
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
# coding: utf-8 from __future__ import unicode_literals from datetime import datetime import re import time from .common import InfoExtractor from ..utils import ( ExtractorError, url_or_none, traverse_obj, ) class Kanal2IE(InfoExtractor): SUBTITLE_DATE_RE = re.compile(r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:...
```suggestion unified_timestamp, ) ```
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +)
yt_dlp/extractor/kanal2.py
8
Python
0.429
suggestion
45
33
33
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
# coding: utf-8 from __future__ import unicode_literals from datetime import datetime import re import time from .common import InfoExtractor from ..utils import ( ExtractorError, url_or_none, traverse_obj, ) class Kanal2IE(InfoExtractor): SUBTITLE_DATE_RE = re.compile(r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:...
one-time use var; use pattern inline instead ```suggestion ```
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
15
Python
0.643
suggestion
64
40
40
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
# coding: utf-8 from __future__ import unicode_literals from datetime import datetime import re import time from .common import InfoExtractor from ..utils import ( ExtractorError, url_or_none, traverse_obj, ) class Kanal2IE(InfoExtractor): SUBTITLE_DATE_RE = re.compile(r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:...
will this extractor work with other postimees.ee sites? if so, then should it still be named Kanal2? ```suggestion _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?]+\?(.*?&)?id=(?P<id>\d+)' ``` or if we do want to match any subdomain then we should do it safely: ```suggestion _VALID_URL = r'https?://(?:[...
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
17
Python
0.857
refactor
379
42
42
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
class Kanal2IE(InfoExtractor): SUBTITLE_DATE_RE = re.compile(r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2})\)$') _VALID_URL = r'https?://.+\.postimees\.ee/[^?]+\?(.*?&)?id=(?P<id>\d+)' _TESTS = [ { 'note': 'Test standard url (#5575)', 'url': 'https://kanal2.postimees.ee/pluss/video/...
```suggestion return { ```
'note': 'Test standard url (#5575)', 'url': 'https://kanal2.postimees.ee/pluss/video/?id=40792', 'md5': '7ea7b16266ec1798743777df241883dd', 'info_dict': { 'id': '40792', 'ext': 'mp4', 'title': 'Aedniku aabits / Osa 53 (05.08.2016 20:00)', ...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
0.429
suggestion
35
51
51
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
_TESTS = [ { 'note': 'Test standard url (#5575)', 'url': 'https://kanal2.postimees.ee/pluss/video/?id=40792', 'md5': 'baf49cab468cf553bc1cf36909f1a0c7', 'info_dict': { 'id': '40792', 'ext': 'mp4', 'title': 'Aedni...
unnecessary ```suggestion ```
'id': '40792', 'ext': 'mp4', 'title': 'Aedniku aabits / Osa 53 (05.08.2016 20:00)', 'thumbnail': r're:https?://.*\.jpg$', 'description': 'md5:53cabf3c5d73150d594747f727431248', 'upload_date': '20160805', 'timestamp': 1470420000, ...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
0.429
suggestion
31
51
50
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
}, ] def _real_extract(self, url): video_id = self._match_id(url) playlist = self.get_playlist(video_id) info = { 'id': video_id, 'title': self.get_title(playlist.get('info')), 'description': traverse_obj(playlist, ('info', 'description')), ...
`info['subtitle']` is fatal and should not be. one-time use function, move into `_real_extract` ```py title = traverse_obj(playlist, ('info', 'title')) sub = traverse_obj(sub, ('info', 'subtitle')) if sub: title = f'{title} / {sub}' ``` `sub` var can be used for the `timestamp...
video_id, query={'type': 'episodes'}, headers={'X-Requested-With': 'XMLHttpRequest'}) return { 'id': video_id, 'title': join_nonempty(*traverse_obj(playlist, ('info', ('title', 'subtitle'))), delim=' / '), 'description': traverse_obj(playlist, ('info'...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
0.857
refactor
539
51
36
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
title += ' / ' + info['subtitle'] return title def get_timestamp(self, subtitle): if not subtitle: return None # Extract timestamp from: # "subtitle": "Osa 53 (05.08.2016 20:00)", match = self._search_regex(self.SUBTITLE_DATE_RE, subtitle, 'dateand...
one-time use function; use `unified_timestamp` instead, could even be inlined in return: ```py 'timestamp': unified_timestamp( self._search_regex( r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2})\)$', sub, 'dateandtime', default=None)) ``` or alternativ...
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
0.857
suggestion
417
51
67
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
try: import pytz # the time is always in this timezone tz = pytz.timezone('Europe/Tallinn') unixtime += tz.utcoffset(date).microseconds except ImportError: pass return unixtime def get_formats(self, playlist, video_id): fo...
m3u8 manifests need to be extracted with `self._extract_m3u8_formats` `self._sort_formats` is now deprecated and no longer necessary due to a recent commit
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
0.571
refactor
158
51
67
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
formats = [] session = self.get_session(traverse_obj(playlist, ('data', 'path')), video_id) sid = session.get('session') for stream in traverse_obj(playlist, ('data', 'streams'), default=[]): if not stream.get('file'): continue formats.append({ ...
one-time use function; move this into `_real_extract` instead ```py playlist = self._download_json( f'https://kanal2.postimees.ee/player/playlist/{video_id}, video_id, headers={ 'X-Requested-With': 'XMLHttpRequest', }, query={ 'type': 'episodes', ...
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
1
refactor
337
41
67
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
return formats def get_playlist(self, video_id): url = 'https://kanal2.postimees.ee/player/playlist/%(video_id)s' % {'video_id': video_id} query = { 'type': 'episodes', } headers = { 'X-Requested-With': 'XMLHttpRequest', } return self...
one-time use function; move into `_real_extract` or into `get_formats` ```py session = self._download_json( 'https://sts.postimees.ee/session/register', video_id, headers={ 'X-Original-URI': traverse_obj(playlist, ('data', 'path')), 'Accept': 'application/json', ...
from .common import InfoExtractor from ..utils import ( ExtractorError, join_nonempty, traverse_obj, unified_timestamp, update_url_query, ) class Kanal2IE(InfoExtractor): _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' _TESTS = [{ 'note': 'Test standa...
@@ -0,0 +1,122 @@ +# coding: utf-8 +from __future__ import unicode_literals +from datetime import datetime +import re +import time +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + url_or_none, + traverse_obj, +) + + +class Kanal2IE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile...
yt_dlp/extractor/kanal2.py
26
Python
1
refactor
501
27
67
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
playlist = self._download_json( f'https://kanal2.postimees.ee/player/playlist/{video_id}', video_id, query={'type': 'episodes'}, headers={'X-Requested-With': 'XMLHttpRequest'}) return { 'id': video_id, 'title': join_nonempty(*traverse_obj(play...
```suggestion def get_formats(self, playlist, video_id): path = traverse_obj(playlist, ('data', 'path')) if not path: raise ExtractorError('Path value not found in playlist JSON response') session = self._download_json( 'https://sts.postimees.ee/session/register...
video_id, query={'type': 'episodes'}, headers={'X-Requested-With': 'XMLHttpRequest'}) return { 'id': video_id, 'title': join_nonempty(*traverse_obj(playlist, ('info', ('title', 'subtitle'))), delim=' / '), 'description': traverse_obj(playlist, ('info'...
@@ -0,0 +1,64 @@ +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + join_nonempty, + traverse_obj, + unified_timestamp, + update_url_query, +) + + +class Kanal2IE(InfoExtractor): + _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' + _TESTS = [...
yt_dlp/extractor/kanal2.py
26
Python
1
refactor
743
34
36
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
'ext': 'mp4', 'title': 'Aedniku aabits / Osa 53 (05.08.2016 20:00)', 'thumbnail': r're:https?://.*\.jpg$', 'description': 'md5:53cabf3c5d73150d594747f727431248', 'upload_date': '20160805', 'timestamp': 1470420000, ...
```suggestion traverse_obj(playlist, ('info', 'subtitle')), 'timestamp', default='') + ' +0200'), ```
'title': 'Aedniku aabits / Osa 53 (05.08.2016 20:00)', 'thumbnail': r're:https?://.*\.jpg$', 'description': 'md5:53cabf3c5d73150d594747f727431248', 'upload_date': '20160805', 'timestamp': 1470420000, }, }] def _real_extract(self, url): ...
@@ -0,0 +1,68 @@ +from .common import InfoExtractor +from ..utils import ( + ExtractorError, + join_nonempty, + traverse_obj, + unified_timestamp, + update_url_query, +) + + +class Kanal2IE(InfoExtractor): + _VALID_URL = r'https?://kanal2\.postimees\.ee/[^?#]+\?([^#]+&)?id=(?P<id>\d+)' + _TESTS = [...
yt_dlp/extractor/kanal2.py
26
Python
0.714
suggestion
119
50
48
false
Add new extractor: Kanal2
5,575
yt-dlp/yt-dlp
132,642
Python
bashonly
glensc
} elif data_process.get('type') == 'audio': yield { 'id': str(data_process['id']), 'title': data_process.get('title'), 'url': traverse_obj(data_process, ('media', 'src')), 'ext': 'mp3', } def _entries(self,...
```suggestion [nextjs_json['video']] if site_type == 'video' else nextjs_json['items'], display_id), ``` Then u can revert all changes to _entries, correct?
'id': str(item['id']), 'title': item.get('title'), 'url': traverse_obj(item, ('media', 'src')), 'ext': 'mp3', } def _real_extract(self, url): site_type, display_id = self._match_valid_url(url).group('type', 'dis...
@@ -37,59 +43,84 @@ class NOSNLArticleIE(InfoExtractor): 'info_dict': { 'id': '2440789', 'title': 'Wekdienst 16/8: Groningse acties tien jaar na zware aardbeving • Femke Bol in actie op EK atletiek ', - 'description': 'Nieuws, weer, verkeer: met dit overzich...
yt_dlp/extractor/nosnl.py
26
Python
0.929
question
175
37
26
false
[extractor/nosnl] Add support for /video
5,590
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
def _entries(self, nextjs_json, display_id): if isinstance(nextjs_json, dict): yield from self._get_video_data(nextjs_json, display_id) else: for item in nextjs_json: yield from self._get_video_data(item, display_id) def _real_extract(self, url): ...
```suggestion 'categories': traverse_obj(nextjs_json, ('categories', ..., 'label')), ``` traverse_obj never raises
from .common import InfoExtractor from ..utils import parse_duration, parse_iso8601, traverse_obj class NOSNLArticleIE(InfoExtractor): _VALID_URL = r'https?://nos\.nl/(?P<type>video|(\w+/)?\w+)/?\d+-(?P<display_id>[\w-]+)' _TESTS = [ { # only 1 video 'url': 'https://nos.nl/nieu...
@@ -37,59 +43,84 @@ class NOSNLArticleIE(InfoExtractor): 'info_dict': { 'id': '2440789', 'title': 'Wekdienst 16/8: Groningse acties tien jaar na zware aardbeving • Femke Bol in actie op EK atletiek ', - 'description': 'Nieuws, weer, verkeer: met dit overzich...
yt_dlp/extractor/nosnl.py
26
Python
0.714
suggestion
129
28
116
false
[extractor/nosnl] Add support for /video
5,590
yt-dlp/yt-dlp
132,642
Python
pukkandan
HobbyistDev
}), note='Logging in with video password') except ExtractorError as e: if not isinstance(e.cause, urllib.error.HTTPError) or e.cause.code != 418: raise raise ExtractorError('Wrong video password', expected=True) description = None ...
```suggestion return self.url_result(vimeo_url, VimeoIE, video_id, url_transparent=True, description=description) ```
import base64 import functools import re import itertools import urllib.error from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, compat_urlparse, ) from ..utils import ( clean_html, determine_ext, ExtractorError, get_element_by_class, HEADRequest, ...
@@ -1393,3 +1353,95 @@ def _real_extract(self, url): info = self._parse_config(config, video_id) info['id'] = video_id return info + + +class VimeoProIE(VimeoBaseInfoExtractor): + IE_NAME = 'vimeo:pro' + _VALID_URL = r'https?://(?:www\.)?vimeopro\.com/[^/?#]+/(?P<slug>[^/?#]+)(?:(?:/vid...
yt_dlp/extractor/vimeo.py
26
Python
0.714
suggestion
159
27
1,442
false
[extractor/vimeo] Add `VimeoProIE`
5,596
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
password_form = self._search_regex( r'(?is)<form[^>]+?method=["\']post["\'][^>]*>(.+?password.+?)</form>', webpage, 'password form', default=None) if password_form: try: webpage = self._download_webpage(url, display_id, data=urlencode_postdata({ ...
```suggestion elif video_id: vimeo_url = f'https://vimeo.com/{video_id}' else: raise ExtractorError( 'No Vimeo embed or video ID could be found in VimeoPro page', expected=True) ```
password_form = self._search_regex( r'(?is)<form[^>]+?method=["\']post["\'][^>]*>(.+?password.+?)</form>', webpage, 'password form', default=None) if password_form: try: webpage = self._download_webpage(url, display_id, data=urlencode_postdata({ ...
@@ -1393,3 +1353,95 @@ def _real_extract(self, url): info = self._parse_config(config, video_id) info['id'] = video_id return info + + +class VimeoProIE(VimeoBaseInfoExtractor): + IE_NAME = 'vimeo:pro' + _VALID_URL = r'https?://(?:www\.)?vimeopro\.com/[^/?#]+/(?P<slug>[^/?#]+)(?:(?:/vid...
yt_dlp/extractor/vimeo.py
26
Python
1
refactor
243
35
29
false
[extractor/vimeo] Add `VimeoProIE`
5,596
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
}, 'params': { 'videopassword': 'Conference2022', 'skip_download': True, }, }] def _real_extract(self, url): display_id, video_id = self._match_valid_url(url).group('slug', 'id') if video_id: display_id = video_id webpage = sel...
I'd write it in reverse, but :shrug: ```suggestion except ExtractorError as e: if isinstance(e.cause, urllib.error.HTTPError) and e.cause.code == 418: raise ExtractorError('Wrong video password', expected=True) raise ```
}, 'params': { 'videopassword': 'Conference2022', 'skip_download': True, }, }] def _real_extract(self, url): display_id, video_id = self._match_valid_url(url).group('slug', 'id') if video_id: display_id = video_id webpage = sel...
@@ -1393,3 +1353,95 @@ def _real_extract(self, url): info = self._parse_config(config, video_id) info['id'] = video_id return info + + +class VimeoProIE(VimeoBaseInfoExtractor): + IE_NAME = 'vimeo:pro' + _VALID_URL = r'https?://(?:www\.)?vimeopro\.com/[^/?#]+/(?P<slug>[^/?#]+)(?:(?:/vid...
yt_dlp/extractor/vimeo.py
26
Python
1
bug
292
48
42
false
[extractor/vimeo] Add `VimeoProIE`
5,596
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
url = self._search_regex(self._VALID_URL, webpage, 'redirection url', group='url') url = self._request_webpage(url, None, note='Resolving final URL').geturl() mobj = self._match_valid_url(url) subdomain = mobj.group('subdomain') siteurl = mobj.group('siteurl_1') or mobj.group...
```suggestion raise ExtractorError(f'{self.IE_NAME} said: {stream["code"]} - {stream["message"]}', expected=True) ```
url = self._search_regex(self._VALID_URL, webpage, 'redirection url', group='url') url = self._request_webpage(url, None, note='Resolving final URL').geturl() mobj = self._match_valid_url(url) subdomain = mobj.group('subdomain') siteurl = mobj.group('siteurl_1') or mobj.group...
@@ -38,11 +39,31 @@ def _real_extract(self, url): siteurl = mobj.group('siteurl_1') or mobj.group('siteurl_2') video_id = mobj.group('id') - stream = self._download_json( + password = self.get_param('videopassword') + + headers = {'Accept': 'application/json'} + if passwo...
yt_dlp/extractor/ciscowebex.py
26
Python
0.929
refactor
131
51
51
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
password = self.get_param('videopassword') headers = {'Accept': 'application/json'} if password: headers['accessPwd'] = password stream, urlh = self._download_json_handle( 'https://%s.webex.com/webappng/api/v1/recordings/%s/stream' % (subdomain, video_id), ...
```suggestion self.raise_login_required( f'{self.IE_NAME} asks you to solve a CAPTCHA. Solve CAPTCHA in browser and', method=cookies) ```
password = self.get_param('videopassword') headers = {'Accept': 'application/json'} if password: headers['accessPwd'] = password stream, urlh = self._download_json_handle( 'https://%s.webex.com/webappng/api/v1/recordings/%s/stream' % (subdomain, video_id), ...
@@ -38,11 +39,31 @@ def _real_extract(self, url): siteurl = mobj.group('siteurl_1') or mobj.group('siteurl_2') video_id = mobj.group('id') - stream = self._download_json( + password = self.get_param('videopassword') + + headers = {'Accept': 'application/json'} + if passwo...
yt_dlp/extractor/ciscowebex.py
26
Python
0.714
suggestion
185
51
51
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
'format_id': 'video', 'url': stream['fallbackPlaySrc'], 'ext': 'mp4', 'vcodec': 'avc1.640028', 'acodec': 'mp4a.40.2', }] if stream.get('preventDownload') is False: mp4url = try_get(stream, lambda x: x['downloadRecordingInfo']['downl...
Deprecated ```suggestion ```
'url': stream['fallbackPlaySrc'], 'ext': 'mp4', 'vcodec': 'avc1.640028', 'acodec': 'mp4a.40.2', }] if stream.get('preventDownload') is False: mp4url = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['mp4URL']) i...
@@ -72,13 +93,14 @@ def _real_extract(self, url): 'vcodec': 'none', 'acodec': 'mp3', }) + self._sort_formats(formats)
yt_dlp/extractor/ciscowebex.py
26
Python
0.429
suggestion
30
39
37
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
}] if stream.get('preventDownload') is False: mp4url = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['mp4URL']) if mp4url: formats.append({ 'format_id': 'video', 'url': mp4url, 'ext...
The comment was to indicate that this is inconsistent in returning id vs mail. Has the situation changed?
if stream.get('preventDownload') is False: mp4url = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['mp4URL']) if mp4url: formats.append({ 'format_id': 'video', 'url': mp4url, 'ext': 'mp4', ...
@@ -72,13 +93,14 @@ def _real_extract(self, url): 'vcodec': 'none', 'acodec': 'mp3', }) + self._sort_formats(formats) return { 'id': video_id, 'title': stream['recordName'], 'description': stream.get('des...
yt_dlp/extractor/ciscowebex.py
26
Python
0.429
question
105
34
32
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
video_id = mobj.group('id') password = self.get_param('videopassword') headers = {'Accept': 'application/json'} if password: headers['accessPwd'] = password stream, urlh = self._download_json_handle( 'https://%s.webex.com/webappng/api/v1/recordings/%s/s...
```suggestion method='cookies') ```
video_id = mobj.group('id') password = self.get_param('videopassword') headers = {'Accept': 'application/json'} if password: headers['accessPwd'] = password stream, urlh = self._download_json_handle( 'https://%s.webex.com/webappng/api/v1/recordings/%s/s...
@@ -38,11 +39,30 @@ def _real_extract(self, url): siteurl = mobj.group('siteurl_1') or mobj.group('siteurl_2') video_id = mobj.group('id') - stream = self._download_json( + password = self.get_param('videopassword') + + headers = {'Accept': 'application/json'} + if passwo...
yt_dlp/extractor/ciscowebex.py
26
Python
0.571
suggestion
53
51
51
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
def _real_extract(self, url): mobj = self._match_valid_url(url) rcid = mobj.group('rcid') if rcid: webpage = self._download_webpage(url, None, note='Getting video ID') url = self._search_regex(self._VALID_URL, webpage, 'redirection url', group='url') url = se...
```suggestion self.raise_login_required() ```
def _real_extract(self, url): mobj = self._match_valid_url(url) rcid = mobj.group('rcid') if rcid: webpage = self._download_webpage(url, None, note='Getting video ID') url = self._search_regex(self._VALID_URL, webpage, 'redirection url', group='url') url = se...
@@ -38,11 +39,30 @@ def _real_extract(self, url): siteurl = mobj.group('siteurl_1') or mobj.group('siteurl_2') video_id = mobj.group('id') - stream = self._download_json( + password = self.get_param('videopassword') + + headers = {'Accept': 'application/json'} + if passwo...
yt_dlp/extractor/ciscowebex.py
26
Python
0.571
suggestion
63
51
51
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
webpage = self._download_webpage(url, None, note='Getting video ID') url = self._search_regex(self._VALID_URL, webpage, 'redirection url', group='url') url = self._request_webpage(url, None, note='Resolving final URL').geturl() mobj = self._match_valid_url(url) subdomain ...
```suggestion if password: raise ExtractorError('Wrong password', expected=True) raise ExtractorError( 'This video is protected by a password, use the --video-password option', expected=True) ```
webpage = self._download_webpage(url, None, note='Getting video ID') url = self._search_regex(self._VALID_URL, webpage, 'redirection url', group='url') url = self._request_webpage(url, None, note='Resolving final URL').geturl() mobj = self._match_valid_url(url) subdomain ...
@@ -38,11 +39,30 @@ def _real_extract(self, url): siteurl = mobj.group('siteurl_1') or mobj.group('siteurl_2') video_id = mobj.group('id') - stream = self._download_json( + password = self.get_param('videopassword') + + headers = {'Accept': 'application/json'} + if passwo...
yt_dlp/extractor/ciscowebex.py
26
Python
1
bug
272
51
51
false
[extractor/ciscowebex] Support password-protected videos
5,601
yt-dlp/yt-dlp
132,642
Python
pukkandan
damianoamatruda
'ext': 'mp4', 'title': 'Inserting and Aligning the Case Top and Bottom', 'description': '', 'uploader': 'Paul Gunn', 'extra_param_to_segment_url': str, }, 'params': { 'skip_download': True, }, }] def _real_extract(s...
Supporting extra_param_to_segment_url in dash.py sounds trivial. Am I missing something?
'ext': 'mp4', 'title': 'Inserting and Aligning the Case Top and Bottom', 'description': '', 'uploader': 'Paul Gunn', 'extra_param_to_segment_url': str, }, 'params': { 'skip_download': 'm3u8', }, }] def _real_extract...
@@ -0,0 +1,49 @@ +import urllib.parse + +from .common import InfoExtractor +from ..utils import traverse_obj, update_url_query + + +class ScreencastifyIE(InfoExtractor): + _VALID_URL = r'https?://watch\.screencastify\.com/v/(?P<id>[^/?#]+)' + _TESTS = [{ + 'url': 'https://watch.screencastify.com/v/sYVkZip3...
yt_dlp/extractor/screencastify.py
26
Python
0.214
question
88
38
41
false
[extractor/screencastify] Add extractor
5,604
yt-dlp/yt-dlp
132,642
Python
pukkandan
bashonly
_TESTS = [{ 'url': 'https://www.radioradicale.it/scheda/471591', 'info_dict': { 'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'creator': 'Giuseppe Di Leo', 'location': 'Napoli', 'timestamp': 1460...
Why not `_search_json_ld` directly?
'info_dict': { 'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', 'location': 'Napoli', 'duration': 2852.0, 'timestamp': 1459987200, ...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[...
yt_dlp/extractor/radioradicale.py
26
Python
0.214
question
35
51
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'creator': 'Giuseppe Di Leo', 'location': 'Napoli', 'timestamp': 1460044800.0, 'upload_date': '20160407', 'description': 'md5:5e15a789a2fe4d67da8...
```suggestion formats, subtitles = self._extract_m3u8_formats_and_subtitles( video_info['playlist'][0]['sources'][0]['src'], video_id) ```
'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', 'location': 'Napoli', 'duration': 2852.0, 'timestamp': 1459987200, 'upload_date': '20160407', 'thumbnail': 'https://www.radioradical...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[...
yt_dlp/extractor/radioradicale.py
26
Python
0.786
refactor
161
51
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
} }] def _real_extract(self, url): setlocale(LC_ALL, '') video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) video_info = self._parse_json(self._search_regex( r'jQuery\.extend\(Drupal\.settings\s*,\s*({.+?})\);', webpa...
Don't assume there's only one format
'url': 'https://www.radioradicale.it/scheda/742783/parlamento-riunito-in-seduta-comune-11a-della-xix-legislatura', 'info_dict': { 'id': '742783', 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)', 'description': '-) Votazione per l\'elezione d...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[...
yt_dlp/extractor/radioradicale.py
26
Python
0.071
style
36
43
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
def _real_extract(self, url): setlocale(LC_ALL, '') video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) video_info = self._parse_json(self._search_regex( r'jQuery\.extend\(Drupal\.settings\s*,\s*({.+?})\);', webpage, 'drupal setti...
```py creator, time = self._search_regex( r' \| di&nbsp;(?P<creator>.+?) - (?:.+?) - (?P<time>\d+:\d+)' ...) ```
'id': '742783', 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)', 'description': '-) Votazione per l\'elezione di un giudice della Corte Costituzionale (nono scrutinio)', 'location': 'CAMERA', 'duration': 5868.0, 'timestam...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[...
yt_dlp/extractor/radioradicale.py
26
Python
0.714
suggestion
148
41
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
playlist = self._extract_m3u8_formats_and_subtitles( video_info['playlist'][0]['sources'][0]['src'], video_id) base_url = urlparse(video_info['playlist'][0]['sources'][0]['src'])._replace( params='', query='', fragment='') playlist[0][0]['fragment_base_url'] = \ ...
https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#mandatory-and-optional-metafields
'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)', }, }, { 'md5': 'be915c189c70ad2920e5810f32260ff5', 'info_dict': { 'id': '742783-1', 'ext': 'mp4', 'title': 'Parlamento riunito in seduta...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[...
yt_dlp/extractor/radioradicale.py
26
Python
0.214
suggestion
94
28
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) video_info = self._parse_json(self._search_regex( r'jQuery\.extend\(Drupal\.settings\s*,\s*({.+?})\);', webpage, 'drupal settings'), video_id)['RRscheda'] json_ld = list(self._yield_j...
u r just discarding any subtitles?
'duration': 5868.0, 'timestamp': 1730246400, 'upload_date': '20241030', }, 'playlist': [{ 'md5': 'aa48de55dcc45478e4cd200f299aab7d', 'info_dict': { 'id': '742783-0', 'ext': 'mp4', 'title': 'Parlam...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[...
yt_dlp/extractor/radioradicale.py
26
Python
0.071
question
34
37
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
from locale import LC_ALL, setlocale from .common import InfoExtractor from urllib.parse import urlparse from re import sub from datetime import datetime from os.path import dirname class RadioRadicaleIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' _TESTS = [{ ...
```suggestion import os.path import re import urllib.parse from .common import InfoExtractor ``` * Sort imports * Always import whole modules from stdlib
from .common import InfoExtractor from ..utils import url_or_none from ..utils.traversal import traverse_obj class RadioRadicaleIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'https://www.radioradicale.it/scheda/471591', 'md5': ...
@@ -0,0 +1,64 @@ +from locale import LC_ALL, setlocale +from .common import InfoExtractor +from urllib.parse import urlparse +from re import sub +from datetime import datetime +from os.path import dirname
yt_dlp/extractor/radioradicale.py
6
Python
0.786
refactor
164
31
31
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
class RadioRadicaleIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'https://www.radioradicale.it/scheda/471591', 'info_dict': { 'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0be...
```suggestion webpage, 'video_info', video_id)['RRscheda'] ```
_TESTS = [{ 'url': 'https://www.radioradicale.it/scheda/471591', 'md5': 'eb0fbe43a601f1a361cbd00f3c45af4a', 'info_dict': { 'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'description': 'md5:5e15a789a2fe4d67da8d13...
@@ -0,0 +1,56 @@ +from .common import InfoExtractor +from ..utils import ( + strftime_or_none, + traverse_obj, +) + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/scheda/471591'...
yt_dlp/extractor/radioradicale.py
26
Python
0.571
suggestion
76
50
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
'location': 'Napoli', 'timestamp': 1459987200, 'upload_date': '20160407', 'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg', }, 'params': { 'skip_downl...
```suggestion subtitles = {sub.get('srclang') or 'und': [{ ```
'location': 'Napoli', 'duration': 2852.0, 'timestamp': 1459987200, 'upload_date': '20160407', 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg', }, }, { 'url': 'https://www.radioradicale.it/scheda/742783/parlamento...
@@ -0,0 +1,56 @@ +from .common import InfoExtractor +from ..utils import ( + strftime_or_none, + traverse_obj, +) + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/scheda/471591'...
yt_dlp/extractor/radioradicale.py
26
Python
0.571
suggestion
72
42
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg', }, 'params': { 'skip_download': True, }, }] def _real_extract(self, url): video_id = self._match_id(url) ...
```suggestion }] for sub in traverse_obj(video_info, ('playlist', 0, 'subtitles', ...))} ```
'upload_date': '20160407', 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg', }, }, { 'url': 'https://www.radioradicale.it/scheda/742783/parlamento-riunito-in-seduta-comune-11a-della-xix-legislatura', 'info_dict': { 'id': '742783'...
@@ -0,0 +1,56 @@ +from .common import InfoExtractor +from ..utils import ( + strftime_or_none, + traverse_obj, +) + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/scheda/471591'...
yt_dlp/extractor/radioradicale.py
26
Python
0.714
suggestion
102
39
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg', }, 'params': { 'skip_download': True, }, }] def _real_extract(self, url): video_id = self._match_id(url) ...
If there are multiple subs of same language, this will cause them them to overwrite each other. Loop over the subs and append to list instead. See other extractors for example
'upload_date': '20160407', 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg', }, }, { 'url': 'https://www.radioradicale.it/scheda/742783/parlamento-riunito-in-seduta-comune-11a-della-xix-legislatura', 'info_dict': { 'id': '742783'...
@@ -0,0 +1,56 @@ +from .common import InfoExtractor +from ..utils import ( + strftime_or_none, + traverse_obj, +) + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/scheda/471591'...
yt_dlp/extractor/radioradicale.py
26
Python
0.429
refactor
175
39
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pukkandan
a13ssandr0
'info_dict': { 'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'location': 'Napoli', 'timestamp': 1459987200, 'upload_date': '20160407', 'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', ...
Multi videos should be supported instead of always picking the first one. Example: https://www.radioradicale.it/scheda/742783/parlamento-riunito-in-seduta-comune-11a-della-xix-legislatura
'md5': 'eb0fbe43a601f1a361cbd00f3c45af4a', 'info_dict': { 'id': '471591', 'ext': 'mp4', 'title': 'md5:e8fbb8de57011a3255db0beca69af73d', 'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef', 'location': 'Napoli', 'duration': 2852.0...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import url_or_none +from ..utils.traversal import traverse_obj + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/sched...
yt_dlp/extractor/radioradicale.py
26
Python
0.429
suggestion
188
47
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
seproDev
a13ssandr0
video_info = self._search_json( r'jQuery\.extend\(Drupal\.settings\s*,', webpage, 'video_info', video_id)['RRscheda'] json_ld = self._search_json_ld(webpage, video_id) formats = [] for source in traverse_obj(video_info, ('playlist', 0, 'sources')): fo...
Let's simplify and inline the `_search_json_ld` call. ```suggestion 'title': self._og_search_title(webpage), 'location': video_info.get('luogo'), 'description': self._og_search_description(webpage), **self._search_json_ld(webpage, video_id), ```
'duration': 5868.0, 'timestamp': 1730246400, 'upload_date': '20241030', }, 'playlist': [{ 'md5': 'aa48de55dcc45478e4cd200f299aab7d', 'info_dict': { 'id': '742783-0', 'ext': 'mp4', 'title': 'Parlam...
@@ -0,0 +1,55 @@ +from .common import InfoExtractor +from ..utils import url_or_none +from ..utils.traversal import traverse_obj + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/sched...
yt_dlp/extractor/radioradicale.py
26
Python
0.857
refactor
299
28
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
seproDev
a13ssandr0
}, { 'md5': 'be915c189c70ad2920e5810f32260ff5', 'info_dict': { 'id': '742783-1', 'ext': 'mp4', 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)', }, }, { 'md5': 'f0ee4047342baf8ed3128...
```suggestion fmts, subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id) ``` Hmm... https://github.com/yt-dlp/yt-dlp/blob/a6783a3b9905e547f6c1d4df9d7c7999feda8afa/yt_dlp/extractor/common.py#L2038-L2048
}, { 'md5': 'be915c189c70ad2920e5810f32260ff5', 'info_dict': { 'id': '742783-1', 'ext': 'mp4', 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)', }, }, { 'md5': 'f0ee4047342baf8ed3128...
@@ -0,0 +1,105 @@ +from .common import InfoExtractor +from ..utils import url_or_none +from ..utils.traversal import traverse_obj + + +class RadioRadicaleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)' + _TESTS = [{ + 'url': 'https://www.radioradicale.it/sche...
yt_dlp/extractor/radioradicale.py
26
Python
0.857
refactor
240
51
51
false
[ie/RadioRadicale] Add extractor
5,607
yt-dlp/yt-dlp
132,642
Python
pzhlkj6612
a13ssandr0