static L> youTubeSearch_uncached(Browser browser, S query) { temp var page = playwrightOpenPage(browser, appendParamsToURL("https://www.youtube.com/results", search_query := query)); L links1 = page.querySelectorAll("a[href]"); LPairS links = map(links1, l -> pair(l.getAttribute("href"), l.innerHTML())); links = filter(links, l -> startsWith(l.a, "/watch?") && empty(urlParam(l.a, "list"))); links = mapPairsB htmldecode_dropTagsAndComments_trim(links); // Filter out weird links links = filter(links, l -> !containsNewLine(l.b) && nempty(l.b)); ret map(links, l -> WithURL("https://www.youtube.com" + l.a, l.b)); }