sS youtubeSearch_userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"; static int youtubeSearch_timeout = toMS_int(20.0); static L youtubeSearch(S q) { temp tempLoadingAnim("YouTube search: " + q); S pageURL = "https://www.youtube.com/results?search_query=" + urlencode(q); S html = loadPageWithUserAgentAndTimeout(pageURL, youtubeSearch_userAgent, youtubeSearch_timeout); new L out; for (LS ahref : findContainerTag(html, 'a)) { continue unless contains(containerTagGet(ahref, 'class), "tile-link"); S url = makeAbsoluteURL(pageURL, containerTagGet(ahref, 'href)); S text = htmldecode(dropAllTags(join(ahref))); out.add(litorderedmap(+url, +text)); } //Thompson Twins - Hold Me Now (Lyrics) [HQ] ret out; }