Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
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