Skip to content

Commit

Permalink
bring back try-catch for extractJsUrlFromConfig; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
sealedtx committed Oct 8, 2024
1 parent e4235e9 commit d85813c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Include
<dependency>
<groupId>com.github.sealedtx</groupId>
<artifactId>java-youtube-downloader</artifactId>
<version>3.2.4</version>
<version>3.2.5</version>
</dependency>
```

Expand All @@ -392,7 +392,7 @@ dependencyResolutionManagement {
```
```gradleA
dependencies {
implementation 'com.github.sealedtx:java-youtube-downloader:3.2.4'
implementation 'com.github.sealedtx:java-youtube-downloader:3.2.5'
}
```
### Android
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.ikiulian</groupId>
<artifactId>java-youtube-downloader</artifactId>
<version>3.2.4</version>
<version>3.2.5</version>

<name>Java youtube video downloader</name>
<description>Java parser for retrieving youtube video meta info</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@ private VideoInfo parseVideoAndroid(String videoId, YoutubeCallback<VideoInfo> c

} catch (YoutubeException.InvalidJsUrlException e) {
JSONObject playerConfig = downloadPlayerConfig(videoId, callback);
String jsUrl = extractor.extractJsUrlFromConfig(playerConfig, videoId);
String jsUrl;
try {
jsUrl = extractor.extractJsUrlFromConfig(playerConfig, videoId);
} catch (YoutubeException ex) {

if (callback != null) {
callback.onError(ex);
}
throw ex;
}
formats = parseFormats(playerResponse, jsUrl, clientVersion);
} catch (YoutubeException e) {
if (callback != null) {
Expand Down

0 comments on commit d85813c

Please sign in to comment.