mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-22 02:34:39 +00:00
Compare commits
No commits in common. "6d92f87ddc40a31959097622ff01d4a7ca833a13" and "15263d049cb3f47e921b414782490052feca3def" have entirely different histories.
6d92f87ddc
...
15263d049c
@ -27,7 +27,7 @@ from ..utils.traversal import traverse_obj
|
|||||||
|
|
||||||
|
|
||||||
class CDAIE(InfoExtractor):
|
class CDAIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:(?:(?:www|m)\.)?cda\.pl/video|ebd\.cda\.pl/[0-9]+x[0-9]+)/(?P<id>[0-9a-z]+)'
|
_VALID_URL = r'https?://(?:(?:www\.)?cda\.pl/video|ebd\.cda\.pl/[0-9]+x[0-9]+)/(?P<id>[0-9a-z]+)'
|
||||||
_NETRC_MACHINE = 'cdapl'
|
_NETRC_MACHINE = 'cdapl'
|
||||||
|
|
||||||
_BASE_URL = 'https://www.cda.pl'
|
_BASE_URL = 'https://www.cda.pl'
|
||||||
@ -110,9 +110,6 @@ class CDAIE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'http://ebd.cda.pl/0x0/5749950c',
|
'url': 'http://ebd.cda.pl/0x0/5749950c',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}, {
|
|
||||||
'url': 'https://m.cda.pl/video/617297677',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _download_age_confirm_page(self, url, video_id, *args, **kwargs):
|
def _download_age_confirm_page(self, url, video_id, *args, **kwargs):
|
||||||
@ -370,35 +367,35 @@ class CDAIE(InfoExtractor):
|
|||||||
|
|
||||||
class CDAFolderIE(InfoExtractor):
|
class CDAFolderIE(InfoExtractor):
|
||||||
_MAX_PAGE_SIZE = 36
|
_MAX_PAGE_SIZE = 36
|
||||||
_VALID_URL = r'https?://(?:(?:www|m)\.)?cda\.pl/(?P<channel>[\w-]+)/folder/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?cda\.pl/(?P<channel>[\w-]+)/folder/(?P<id>\d+)'
|
||||||
_TESTS = [{
|
_TESTS = [
|
||||||
'url': 'https://www.cda.pl/domino264/folder/31188385',
|
{
|
||||||
'info_dict': {
|
'url': 'https://www.cda.pl/domino264/folder/31188385',
|
||||||
'id': '31188385',
|
'info_dict': {
|
||||||
'title': 'SERIA DRUGA',
|
'id': '31188385',
|
||||||
|
'title': 'SERIA DRUGA',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 13,
|
||||||
},
|
},
|
||||||
'playlist_mincount': 13,
|
{
|
||||||
}, {
|
'url': 'https://www.cda.pl/smiechawaTV/folder/2664592/vfilm',
|
||||||
'url': 'https://www.cda.pl/smiechawaTV/folder/2664592/vfilm',
|
'info_dict': {
|
||||||
'info_dict': {
|
'id': '2664592',
|
||||||
'id': '2664592',
|
'title': 'VideoDowcipy - wszystkie odcinki',
|
||||||
'title': 'VideoDowcipy - wszystkie odcinki',
|
},
|
||||||
|
'playlist_mincount': 71,
|
||||||
},
|
},
|
||||||
'playlist_mincount': 71,
|
{
|
||||||
}, {
|
'url': 'https://www.cda.pl/DeliciousBeauty/folder/19129979/vfilm',
|
||||||
'url': 'https://www.cda.pl/DeliciousBeauty/folder/19129979/vfilm',
|
'info_dict': {
|
||||||
'info_dict': {
|
'id': '19129979',
|
||||||
'id': '19129979',
|
'title': 'TESTY KOSMETYKÓW',
|
||||||
'title': 'TESTY KOSMETYKÓW',
|
},
|
||||||
},
|
'playlist_mincount': 139,
|
||||||
'playlist_mincount': 139,
|
}, {
|
||||||
}, {
|
'url': 'https://www.cda.pl/FILMY-SERIALE-ANIME-KRESKOWKI-BAJKI/folder/18493422',
|
||||||
'url': 'https://www.cda.pl/FILMY-SERIALE-ANIME-KRESKOWKI-BAJKI/folder/18493422',
|
'only_matching': True,
|
||||||
'only_matching': True,
|
}]
|
||||||
}, {
|
|
||||||
'url': 'https://m.cda.pl/smiechawaTV/folder/2664592/vfilm',
|
|
||||||
'only_matching': True,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
folder_id, channel = self._match_valid_url(url).group('id', 'channel')
|
folder_id, channel = self._match_valid_url(url).group('id', 'channel')
|
||||||
|
|||||||
@ -17,7 +17,7 @@ from .traversal import traverse_obj
|
|||||||
def random_user_agent():
|
def random_user_agent():
|
||||||
USER_AGENT_TMPL = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{} Safari/537.36'
|
USER_AGENT_TMPL = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{} Safari/537.36'
|
||||||
# Target versions released within the last ~6 months
|
# Target versions released within the last ~6 months
|
||||||
CHROME_MAJOR_VERSION_RANGE = (137, 143)
|
CHROME_MAJOR_VERSION_RANGE = (134, 140)
|
||||||
return USER_AGENT_TMPL.format(f'{random.randint(*CHROME_MAJOR_VERSION_RANGE)}.0.0.0')
|
return USER_AGENT_TMPL.format(f'{random.randint(*CHROME_MAJOR_VERSION_RANGE)}.0.0.0')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user