// page contents is cached using webScrape // returns pairs (video id, title plus stats) static LPairS videoLinksFromYouTubePage(S url) { S html = webScrape(url); LS l = regexpExtractAll([[\\"(label|videoId)\\":\\"(.*?)\\"]], html); print(+l); S videoId = null; new LPairS out; for (S s : l) { PairS p = listToPair(splitAtColon(unquoteRaw(s))), continue if null; if (eq(p.a, "videoId")) videoId = p.b; else out.add(pair(videoId, p.b)); } ret out; }