1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-07-12 13:26:19 +00:00

Merge 32f48a3a65a5e7bb0776a85cb22a5c0902741165 into c5098961b04ce83f4615f2a846c84f803b072639

This commit is contained in:
Luc Ritchie 2024-08-15 10:11:50 +08:00 committed by GitHub
commit 6544613763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,6 +237,7 @@ class AfreecaTVIE(InfoExtractor):
r'nTitleNo\s*=\s*(\d+)', webpage, 'title', default=video_id)
partial_view = False
adult_view = False
for _ in range(2):
query = {
'nTitleNo': video_id,
@ -245,6 +246,8 @@ class AfreecaTVIE(InfoExtractor):
}
if partial_view:
query['partialView'] = 'SKIP_ADULT'
if adult_view:
query['adultView'] = 'ADULT_VIEW'
video_xml = self._download_xml(
'http://afbbs.afreecatv.com:8080/api/video/get_video_info.php',
video_id, 'Downloading video info XML%s'
@ -264,6 +267,9 @@ class AfreecaTVIE(InfoExtractor):
partial_view = True
continue
elif flag == 'ADULT':
if not adult_view:
adult_view = True
continue
error = 'Only users older than 19 are able to watch this video. Provide account credentials to download this content.'
else:
error = flag