Skip to content

Commit 592b5ca

Browse files
authored
Merge pull request #1456 from dustdfg/youtube_terminated_show
2 parents c1336db + 023c3de commit 592b5ca

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.schabi.newpipe.extractor.MultiInfoItemsCollector;
4646
import org.schabi.newpipe.extractor.StreamingService;
4747
import org.schabi.newpipe.extractor.downloader.Downloader;
48+
import org.schabi.newpipe.extractor.exceptions.AccountTerminatedException;
4849
import org.schabi.newpipe.extractor.exceptions.AgeRestrictedContentException;
4950
import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException;
5051
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
@@ -925,6 +926,10 @@ private static void checkPlayabilityStatus(@Nonnull final JsonObject playability
925926
throw new GeographicRestrictionException(
926927
"This video is not available in client's country.");
927928
}
929+
930+
if (reason.contains("closed") || reason.contains("terminated")) {
931+
throw new AccountTerminatedException(reason);
932+
}
928933
}
929934
}
930935

0 commit comments

Comments
 (0)