Beispiel #1
0
        static void Main(string[] args)
        {
            var exporter = new DataExporter();

            var topicParser = new TopicParser(exporter);
            var topics      = topicParser.GetTopics();

            var recipeParser = new RecipeParser(128, exporter);
            var recipes      = new List <Recipe>();

            foreach (var topic in topics.Skip(46))
            {
                Console.Write($"Parsing topic {topic.Id} recipes... ");
                recipes.AddRange(recipeParser.GetTopicRecipes(topic));
                Console.WriteLine("");
            }
        }
Beispiel #2
0
 public TopicParser(DataExporter dataExporter)
 {
     _dataExporter = dataExporter;
     _link         = "http://www.food.com/topics/";
     _pageArg      = "?pn=";
 }
Beispiel #3
0
 public RecipeParser(int maxPerTopic, DataExporter dataExporter)
 {
     _maxPerTopic  = maxPerTopic;
     _dataExporter = dataExporter;
     _counter      = 0;
 }