コード例 #1
0
        private void AddPhotoMetaUrlToDownloadList(Post post)
        {
            if (!Blog.CreatePhotoMeta || post.Type != "photo")
            {
                return;
            }

            string textBody = tumblrJsonParser.ParsePhotoMeta(post);

            AddToDownloadList(new PhotoMetaPost(textBody, post.Id));
            AddToJsonQueue(new CrawlerData <Post>(Path.ChangeExtension(post.Id, ".json"), post));
        }
コード例 #2
0
 private void AddPhotoMetaUrlToDownloadList(TumblrJson document)
 {
     if (blog.CreatePhotoMeta)
     {
         foreach (Post post in document.response.posts)
         {
             if (!PostWithinTimeSpan(post))
             {
                 continue;
             }
             if ((post.type == "photo") && (!tags.Any() || post.tags.Intersect(tags, StringComparer.OrdinalIgnoreCase).Any()))
             {
                 if (CheckIfDownloadRebloggedPosts(post))
                 {
                     string postId   = post.id;
                     string textBody = tumblrJsonParser.ParsePhotoMeta(post);
                     AddToDownloadList(new PhotoMetaPost(textBody, postId));
                     AddToJsonQueue(new TumblrCrawlerData <Post>(Path.ChangeExtension(postId, ".json"), post));
                 }
             }
         }
     }
 }