Skip to content

Commit 714b141

Browse files
committed
[YouTube] Catch any exception when extracting something from JavaScript's base player
1 parent 588c6a8 commit 714b141

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeJavaScriptPlayerManager.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ public static Integer getSignatureTimestamp(@Nonnull final String videoId)
102102
} catch (final NumberFormatException e) {
103103
sigTimestampExtractionEx =
104104
new ParsingException("Could not convert signature timestamp to a number", e);
105+
} catch (final Exception e) {
106+
sigTimestampExtractionEx = new ParsingException("Could not get signature timestamp", e);
107+
throw e;
105108
}
106109

107110
return cachedSignatureTimestamp;
@@ -146,6 +149,10 @@ public static String deobfuscateSignature(@Nonnull final String videoId,
146149
// performance
147150
sigDeobFuncExtractionEx = e;
148151
throw e;
152+
} catch (final Exception e) {
153+
sigDeobFuncExtractionEx = new ParsingException(
154+
"Could not get signature parameter deobfuscation JavaScript function", e);
155+
throw e;
149156
}
150157
}
151158

@@ -244,6 +251,10 @@ public static String getUrlWithThrottlingParameterDeobfuscated(
244251
// performance
245252
throttlingDeobfFuncExtractionEx = e;
246253
throw e;
254+
} catch (final Exception e) {
255+
throttlingDeobfFuncExtractionEx = new ParsingException(
256+
"Could not get throttling parameter deobfuscation JavaScript function", e);
257+
throw e;
247258
}
248259
}
249260

0 commit comments

Comments
 (0)