From caabbe9c30f0241cebaac487e07f34372d5e4b3c Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:18:14 +0530 Subject: [PATCH] Fetch with android only when there's a PoToken. --- .../services/youtube/extractors/YoutubeStreamExtractor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index 68705c7a22..55fd2ebdd1 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -818,7 +818,9 @@ public void onFetchPage(@Nonnull final Downloader downloader) final PoTokenResult androidPoTokenResult = noPoTokenProviderSet ? null : providerInstance.getAndroidClientPoToken(); - fetchAndroidClient(localization, contentCountry, videoId, androidPoTokenResult); + if (androidPoTokenResult != null) { + fetchAndroidClient(localization, contentCountry, videoId, androidPoTokenResult); + } final byte[] nextBody = JsonWriter.string( prepareDesktopJsonBuilder(localization, contentCountry)