public static void scrapAndSaveTvDotComShows() throws IOException { // ########## get ALL tv shows from TV.com ########## TVDotComCrawler crawler = new TVDotComCrawler(); ArrayList<Show> allShows = crawler.scrapAllShows(MINIMUM_VOTES); // System.out.println(allShows.size()); writeToXmlFile(createDocumentFromShows(allShows), "allShowsTvDotCom.xml"); }
private static void filterShowsByVotes() throws JDOMException, IOException { List<Show> allShows = createShowsFromXml("allShowsTvDotCom.xml"); TVDotComCrawler crawler = new TVDotComCrawler(); long start = System.currentTimeMillis(); crawler.addVotesInfo(allShows, 150, MINIMUM_VOTES); System.out.println("Total time: " + (System.currentTimeMillis() - start)); Document result = createDocumentFromShows(allShows); writeToXmlFile(result, "updatedShows.xml"); }