Skip to content

Commit ab4d626

Browse files
committed
fixed opening videos via firefox/fenec
1 parent 96709d2 commit ab4d626

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/youtube/YoutubeExtractor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ public String getVideoId(String videoUrl) {
9898
try {
9999
URI uri = new URI(videoUrl);
100100
if(uri.getHost().contains("youtube")) {
101-
String query = uri.getQuery();
102-
String queryElements[] = query.split("&");
101+
String fragment = uri.getFragment();
102+
fragment = fragment.replace("/watch?", "");
103+
String queryElements[] = fragment.split("&");
103104
Map<String, String> queryArguments = new HashMap<>();
104105
for (String e : queryElements) {
105106
String[] s = e.split("=");

0 commit comments

Comments
 (0)