mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[youtube] Fix controversial videos when authenticated with cookies (closes #28174)
This commit is contained in:
parent
4b5410c5c8
commit
07eb8f1916
|
@ -1042,6 +1042,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# controversial video, only works with bpctr when authenticated with cookies
|
||||||
|
'url': 'https://www.youtube.com/watch?v=nGC3D_FkCmg',
|
||||||
|
'only_matching': True,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
_formats = {
|
_formats = {
|
||||||
'5': {'ext': 'flv', 'width': 400, 'height': 240, 'acodec': 'mp3', 'abr': 64, 'vcodec': 'h263'},
|
'5': {'ext': 'flv', 'width': 400, 'height': 240, 'acodec': 'mp3', 'abr': 64, 'vcodec': 'h263'},
|
||||||
|
@ -1405,7 +1410,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
base_url = self.http_scheme() + '//www.youtube.com/'
|
base_url = self.http_scheme() + '//www.youtube.com/'
|
||||||
webpage_url = base_url + 'watch?v=' + video_id
|
webpage_url = base_url + 'watch?v=' + video_id
|
||||||
webpage = self._download_webpage(webpage_url, video_id, fatal=False)
|
webpage = self._download_webpage(
|
||||||
|
webpage_url + '&bpctr=9999999999', video_id, fatal=False)
|
||||||
|
|
||||||
player_response = None
|
player_response = None
|
||||||
if webpage:
|
if webpage:
|
||||||
|
|
Loading…
Reference in a new issue