Here you can find the source of getQueryUrl(String word, Integer page)
public static String getQueryUrl(String word, Integer page) throws UnsupportedEncodingException
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.net.URLEncoder; public class Main { private static final String URL_HOST = "http://www.youtube.com"; public static String getQueryUrl(String word, Integer page) throws UnsupportedEncodingException { if (word == null) { return null; }/*from ww w. ja v a 2 s . co m*/ String qp = (page == null) ? "" : ("&page=" + page); return URL_HOST + "/results?search_query=" + URLEncoder.encode(word, "UTF-8") + "&sm=3" + qp; } }