mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 22:00:32 +05:30
Merge pull request #829 from TiA4f8R/yt-subtitles-age-restricted-videos-fix
[YouTube] Extract subtitles for age-restricted videos
This commit is contained in:
commit
bebdc55ad4
@ -654,10 +654,6 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
public List<SubtitlesStream> getSubtitles(final MediaFormat format) throws ParsingException {
|
public List<SubtitlesStream> getSubtitles(final MediaFormat format) throws ParsingException {
|
||||||
assertPageFetched();
|
assertPageFetched();
|
||||||
// If the video is age-restricted getSubtitles will fail
|
|
||||||
if (getAgeLimit() != NO_AGE_LIMIT) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
if (subtitles != null) {
|
if (subtitles != null) {
|
||||||
// Already calculated
|
// Already calculated
|
||||||
return subtitles;
|
return subtitles;
|
||||||
|
Loading…
Reference in New Issue
Block a user