public void CrawlerTest() { var crawler = new CrawlerApp(this.db, new CrawlerV1()); // crawler.DoCrawling(1, "gratidão"); // crawler.DoCrawling(1); crawler.DoCrawling(0); }
private static void StartCrawler() { var db = new EntityFrameworkCrawlerStorage(); var crawler = new CrawlerApp(db, new CrawlerV1()); crawler.OnImageSaved += image => { Console.WriteLine( "{ \"shortcode\":\"" + image.Shortcode + "\", \"from\":\"" + image.User + "\", \"tags\": [" + string.Join(", ", image.HumanoidTags.Select(x => "'" + x + "'")) + "], \"uploaded\":\"" + image.Uploaded + "\", " + "\"likes\":\"" + image.Likes + "\", \"follower\":\"" + image.Follower + "\", \"comments\":\"" + image.Comments + "\", }"); }; crawler.DoCrawling(0); }