From 03893abd9134d457a47f16e12fde58d9d235b0fb Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 26 Apr 2019 18:54:30 +0200 Subject: [PATCH] Fixed TeamNewPipe/NewPipe#2226. (in the youtube subscription extractor) Ignore subscriptions that have an empty title instead of throwing an error: the youtube subscription_manager XML file can sometimes contain those (i.e. deleted channels). --- .../youtube/extractors/YoutubeSubscriptionExtractor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSubscriptionExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSubscriptionExtractor.java index f6b6b8bd9..0fb9a0203 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSubscriptionExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSubscriptionExtractor.java @@ -63,7 +63,11 @@ public class YoutubeSubscriptionExtractor extends SubscriptionExtractor { String title = outline.attr("title"); String xmlUrl = outline.attr("abs:xmlUrl"); - if (title.isEmpty() || xmlUrl.isEmpty()) { + if (title.isEmpty()) { + continue; + } + + if (xmlUrl.isEmpty()) { throw new InvalidSourceException("document has invalid entries"); }