From ab4d626ea98fcf652da0118a61336779027ef682 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Wed, 28 Oct 2015 20:48:03 +0100 Subject: [PATCH] fixed opening videos via firefox/fenec --- .../java/org/schabi/newpipe/youtube/YoutubeExtractor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/youtube/YoutubeExtractor.java b/app/src/main/java/org/schabi/newpipe/youtube/YoutubeExtractor.java index 15a80a950..15a3fdbbc 100644 --- a/app/src/main/java/org/schabi/newpipe/youtube/YoutubeExtractor.java +++ b/app/src/main/java/org/schabi/newpipe/youtube/YoutubeExtractor.java @@ -98,8 +98,9 @@ public class YoutubeExtractor implements Extractor { try { URI uri = new URI(videoUrl); if(uri.getHost().contains("youtube")) { - String query = uri.getQuery(); - String queryElements[] = query.split("&"); + String fragment = uri.getFragment(); + fragment = fragment.replace("/watch?", ""); + String queryElements[] = fragment.split("&"); Map queryArguments = new HashMap<>(); for (String e : queryElements) { String[] s = e.split("=");