mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2024-12-12 20:10:00 +01:00
Update YoutubeStreamExtractor.java
To fix ``java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference``
This commit is contained in:
parent
4e41e172ea
commit
17ccaf4b87
@ -1049,7 +1049,16 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||
storyboardsRenderer = storyboards.getObject("playerStoryboardSpecRenderer");
|
||||
}
|
||||
|
||||
final String[] spec = storyboardsRenderer.getString("spec").split("\\|");
|
||||
if (storyboardsRenderer == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
final String storyboardsRendererSpec = storyboardsRenderer.getString("spec");
|
||||
if (storyboardsRendererSpec == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
final String[] spec = storyboardsRendererSpec.split("\\|");
|
||||
final String url = spec[0];
|
||||
final ArrayList<Frameset> result = new ArrayList<>(spec.length - 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user