2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-30 22:05:18 +00:00

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

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;