Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: cmdGetSchoolRankings Arguments: Description: Retrieve list of best colleges Page type: webl Render function: Module: skillsrank Page source: var P = GetURL("http://colleges.usnews.rankingsandreviews.com/best-colleges/national-universities-rankings/") ? nil; var res = [. .]; while (P != nil) do every seq in Seq(P, "tr span # td") do var school = [. .]; school.rank := Str_Trim(Text(seq[1])) + " " + Str_Trim(Text(seq[2])); var A = Elem(P, "a") inside seq[3]; var name = ""; if Size(A) > 0 then name = Str_Trim(Text(A[0])); school.url := A[0].href end; if Size(ToList(school)) != 0 then res[name] := school; end end; var A = Elem(P, "a") contain Pat(P, "Next Page"); if Size(A) > 0 then P = GetURL(A[0].href) ? nil; else P = nil; end end; res;