mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-15 21:53:21 +00:00
Compare commits
2 Commits
43aebb7db4
...
1f6b90ed8d
Author | SHA1 | Date | |
---|---|---|---|
|
1f6b90ed8d | ||
|
a3e9642116 |
@ -3,7 +3,7 @@ from ..utils import traverse_obj
|
|||||||
|
|
||||||
|
|
||||||
class TVIPlayerIE(InfoExtractor):
|
class TVIPlayerIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://tviplayer\.iol\.pt(/programa/[\w-]+/[a-f0-9]+)?/video/(?P<id>[a-f0-9]+)'
|
_VALID_URL = r'https?://tviplayer\.iol\.pt(/programa/[\w-]+/[a-f0-9]+)?/\w+/(?P<id>\w+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://tviplayer.iol.pt/programa/jornal-das-8/53c6b3903004dc006243d0cf/video/61c8e8b90cf2c7ea0f0f71a9',
|
'url': 'https://tviplayer.iol.pt/programa/jornal-das-8/53c6b3903004dc006243d0cf/video/61c8e8b90cf2c7ea0f0f71a9',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -27,6 +27,7 @@ class TVIPlayerIE(InfoExtractor):
|
|||||||
'season_number': 1,
|
'season_number': 1,
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
# no /programa/
|
||||||
'url': 'https://tviplayer.iol.pt/video/62c4131c0cf2f9a86eac06bb',
|
'url': 'https://tviplayer.iol.pt/video/62c4131c0cf2f9a86eac06bb',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '62c4131c0cf2f9a86eac06bb',
|
'id': '62c4131c0cf2f9a86eac06bb',
|
||||||
@ -37,6 +38,18 @@ class TVIPlayerIE(InfoExtractor):
|
|||||||
'duration': 148,
|
'duration': 148,
|
||||||
'season_number': 2,
|
'season_number': 2,
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
# episodio url
|
||||||
|
'url': 'https://tviplayer.iol.pt/programa/para-sempre/61716c360cf2365a5ed894c4/episodio/t1e187',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 't1e187',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'season': 'Season 1',
|
||||||
|
'title': 'Quem denunciou Pedro?',
|
||||||
|
'thumbnail': 'https://www.iol.pt/multimedia/oratvi/multimedia/imagem/id/62eda30b0cf2ea367d48973b/',
|
||||||
|
'duration': 1250,
|
||||||
|
'season_number': 1,
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_initialize(self):
|
def _real_initialize(self):
|
||||||
|
@ -3133,7 +3133,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if pr:
|
if pr:
|
||||||
prs.append(pr)
|
# YouTube may return a different video player response than expected.
|
||||||
|
# See: https://github.com/TeamNewPipe/NewPipe/issues/8713
|
||||||
|
pr_video_id = traverse_obj(pr, ('videoDetails', 'videoId'))
|
||||||
|
if pr_video_id and pr_video_id != video_id:
|
||||||
|
self.report_warning(
|
||||||
|
f'{client} client returned a player response for "{pr_video_id}" instead of "{video_id}"' + bug_reports_message())
|
||||||
|
else:
|
||||||
|
prs.append(pr)
|
||||||
|
|
||||||
# creator clients can bypass AGE_VERIFICATION_REQUIRED if logged in
|
# creator clients can bypass AGE_VERIFICATION_REQUIRED if logged in
|
||||||
if variant == 'embedded' and self._is_unplayable(pr) and self.is_authenticated:
|
if variant == 'embedded' and self._is_unplayable(pr) and self.is_authenticated:
|
||||||
|
Loading…
Reference in New Issue
Block a user