Merge pull request #691 from TeamPiped/fix-extractor-fetch

Fetch page in extractor before using it
This commit is contained in:
Kavin 2023-08-30 22:55:44 +00:00 committed by GitHub
commit 938758b59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,9 @@ import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper
public class VideoHelpers {
public static void handleNewVideo(String url, long time, me.kavin.piped.utils.obj.db.Channel channel) {
try {
handleNewVideo(YOUTUBE_SERVICE.getStreamExtractor(url), time, channel);
var extractor = YOUTUBE_SERVICE.getStreamExtractor(url);
extractor.fetchPage();
handleNewVideo(extractor, time, channel);
} catch (Exception e) {
ExceptionHandler.handle(e);
}