Merge pull request #829 from TiA4f8R/yt-subtitles-age-restricted-videos-fix

[YouTube] Extract subtitles for age-restricted videos
This commit is contained in:
Robin 2022-04-14 10:31:16 +02:00 committed by GitHub
commit bebdc55ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -654,10 +654,6 @@ public class YoutubeStreamExtractor extends StreamExtractor {
@Nonnull
public List<SubtitlesStream> getSubtitles(final MediaFormat format) throws ParsingException {
assertPageFetched();
// If the video is age-restricted getSubtitles will fail
if (getAgeLimit() != NO_AGE_LIMIT) {
return Collections.emptyList();
}
if (subtitles != null) {
// Already calculated
return subtitles;