1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-05 01:52:22 +01:00

fixed search error

This commit is contained in:
Christian Schabesberger 2016-03-05 17:35:57 +01:00
parent 9a480cbe3e
commit f63b35e2c0

View File

@ -16,6 +16,7 @@ import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import java.net.URLEncoder;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
@ -69,7 +70,7 @@ public class YoutubeSearchEngine extends SearchEngine {
*/
String url = "https://www.youtube.com/results"
+ "?search_query=" + query
+ "?search_query=" + URLEncoder.encode(query, "UTF-8")
+ "&page=" + Integer.toString(page)
+ "&filters=" + "video";
@ -148,8 +149,8 @@ public class YoutubeSearchEngine extends SearchEngine {
+ "?client=" + ""
+ "&output=" + "toolbar"
+ "&ds=" + "yt"
+ "&hl=" + contentCountry
+ "&q=" + query;
+ "&hl=" + URLEncoder.encode(contentCountry, "UTF-8")
+ "&q=" + URLEncoder.encode(query, "UTF-8");
String response = dl.download(url);