writeFile("/tmp/cli-tube-page.html", response.body)
return "/tmp/cli-tube-page.html"
proc extractTitlesAndUrls(htmlFile: string): seq[SearchResult] =
loadHtml(htmlFile).findAll("a").
filter(a => "watch" in a.attrs["href"] and a.attrs.hasKey "title").
writeFile("/tmp/cli-tube-page.html", response.body)
return "/tmp/cli-tube-page.html"
proc extractTitlesAndUrls(htmlFile: string): seq[SearchResult] =
loadHtml(htmlFile).findAll("a").
filter(a => "watch" in a.attrs["href"] and a.attrs.hasKey "title").