aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoletdjnz <colethedj@protonmail.com>2021-07-21 06:01:28 +1200
committerGitHub <noreply@github.com>2021-07-20 23:31:28 +0530
commita1a7907bc0f70ee41bc9c9ec1c66ae6f4e363e25 (patch)
treea7770ba7bfeaa5a1aec9de02e19027afd284d1c4
parentd61fc64618c699ff473ec00d9984ca430a19cf0d (diff)
downloadhypervideo-pre-a1a7907bc0f70ee41bc9c9ec1c66ae6f4e363e25.tar.lz
hypervideo-pre-a1a7907bc0f70ee41bc9c9ec1c66ae6f4e363e25.tar.xz
hypervideo-pre-a1a7907bc0f70ee41bc9c9ec1c66ae6f4e363e25.zip
[youtube] Fix controversial videos when requested via API (#533)
Closes: https://github.com/yt-dlp/yt-dlp/issues/511#issuecomment-883024350 Authored by: colethedj
-rw-r--r--yt_dlp/extractor/youtube.py31
1 files changed, 15 insertions, 16 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index 4d0445abd..b3b43188a 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -1074,21 +1074,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'format': '141/bestaudio[ext=m4a]',
},
},
- # Controversy video
- {
- 'url': 'https://www.youtube.com/watch?v=T4XJQO3qol8',
- 'info_dict': {
- 'id': 'T4XJQO3qol8',
- 'ext': 'mp4',
- 'duration': 219,
- 'upload_date': '20100909',
- 'uploader': 'Amazing Atheist',
- 'uploader_id': 'TheAmazingAtheist',
- 'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/TheAmazingAtheist',
- 'title': 'Burning Everyone\'s Koran',
- 'description': 'SUBSCRIBE: http://www.youtube.com/saturninefilms \r\n\r\nEven Obama has taken a stand against freedom on this issue: http://www.huffingtonpost.com/2010/09/09/obama-gma-interview-quran_n_710282.html',
- }
- },
# Normal age-gate video (embed allowed)
{
'url': 'https://youtube.com/watch?v=HtVdAasjOgU',
@@ -1622,6 +1607,19 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'only_matching': True,
},
{
+ # controversial video, requires bpctr/contentCheckOk
+ 'url': 'https://www.youtube.com/watch?v=SZJvDhaSDnc',
+ 'info_dict': {
+ 'id': 'SZJvDhaSDnc',
+ 'ext': 'mp4',
+ 'title': 'San Diego teen commits suicide after bullying over embarrassing video',
+ 'channel_id': 'UC-SJ6nODDmufqBzPBwCvYvQ',
+ 'uploader': 'CBS This Morning',
+ 'upload_date': '20140716',
+ 'description': 'md5:acde3a73d3f133fc97e837a9f76b53b7'
+ }
+ },
+ {
# restricted location, https://github.com/ytdl-org/youtube-dl/issues/28685
'url': 'cBvYw8_A0vQ',
'info_dict': {
@@ -2265,7 +2263,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
return {
'playbackContext': {
'contentPlaybackContext': context
- }
+ },
+ 'contentCheckOk': True
}
@staticmethod