youtube-dl/youtube_dl
Luc Ritchie 23c996ea99 [afreecatv] Fix adult (19+) VODs
AfreecaTV marks segments of VODs, or entire VODs, as adult content. When
accessing a VOD with adult segments from an underage account or when not
logged in, the first request fails with a "PARTIAL_ADULT" error flag,
and we retry with the partialView=SKIP_ADULT query parameter. This
allows us to download the segments of the video that are not marked as
adult.

Now, when accessing a VOD that is entirely marked as adult content,
the first request fails with an "ADULT" error flag, *even if logged in
to an adult account*. The web client presents a click-through warning,
and refetches the XML with adultView=ADULT_VIEW.

This commit adjusts the existing retry logic for PARTIAL_ADULT to also
support retrying ADULT VODs with the required parameter.

If the same ADULT error is returned on the second attempt, we raise the
same error as before. This will occur if we are not logged in to an
adult account.

At this time it does not appear that the click-through warning has been
added to PARTIAL_ADULT VODs, so if we are logged in, our first request
is still successful. Therefore, the PARTIAL_ADULT logic does not need
to be changed.

The VODs mentioned in the below tickets are both now private, so I
cannot test the given URLs, but I believe that this:

Fixes #26622, fixes #26926
2021-03-10 21:14:12 -05:00
..
downloader [downloader/hls] Disable decryption in tests (#27660) 2021-01-05 01:24:01 +07:00
extractor [afreecatv] Fix adult (19+) VODs 2021-03-10 21:14:12 -05:00
postprocessor [postprocessor/embedthumbnail] Recognize atomicparsley binary in lowercase (#28112) 2021-02-17 03:22:51 +07:00
__init__.py Introduce --output-na-placeholder (closes #27896) 2021-01-22 23:54:29 +07:00
__main__.py
aes.py Switch codebase to use compat_b64decode 2018-01-23 22:23:12 +07:00
cache.py
compat.py Fix typos (#27084) 2020-11-21 22:00:05 +07:00
jsinterp.py
options.py [options] Clarify --extract-audio help string (closes #27878) 2021-01-23 00:00:53 +07:00
socks.py
swfinterp.py
update.py [update] Fix updating via symlinks (closes #23991) 2020-02-08 19:46:58 +07:00
utils.py [utils] add a function to clean podcast URLs 2021-01-04 01:14:25 +01:00
version.py release 2021.03.03 2021-03-03 11:47:34 +07:00
YoutubeDL.py Introduce release_timestamp meta field (refs #28386) 2021-03-10 03:36:31 +07:00