private void AddAnswerUrlToDownloadList(Post post) { if (!Blog.DownloadAnswer || post.Type != "answer") { return; } string textBody = tumblrJsonParser.ParseAnswer(post); AddToDownloadList(new AnswerPost(textBody, post.Id)); AddToJsonQueue(new CrawlerData <Post>(Path.ChangeExtension(post.Id, ".json"), post)); }
private void AddAnswerUrlToDownloadList(Post post) { if (!blog.DownloadAnswer) { return; } if (post.type != "answer") { return; } string postId = post.id; string textBody = tumblrJsonParser.ParseAnswer(post); AddToDownloadList(new AnswerPost(textBody, postId, post.timestamp.ToString())); AddToJsonQueue(new TumblrCrawlerData <Post>(Path.ChangeExtension(postId, ".json"), post)); }
private void AddAnswerUrlToDownloadList(TumblrJson document) { if (blog.DownloadAnswer) { foreach (Post post in document.response.posts) { if (!PostWithinTimeSpan(post)) { continue; } if ((post.type == "answer") && (!tags.Any() || post.tags.Intersect(tags, StringComparer.OrdinalIgnoreCase).Any())) { if (CheckIfDownloadRebloggedPosts(post)) { string postId = post.id; string textBody = tumblrJsonParser.ParseAnswer(post); AddToDownloadList(new AnswerPost(textBody, postId, post.timestamp.ToString())); AddToJsonQueue(new TumblrCrawlerData <Post>(Path.ChangeExtension(postId, ".json"), post)); } } } } }
private void AddAnswerUrlToDownloadList(TumblrApiJson document) { if (blog.DownloadAnswer) { foreach (Post post in document.posts) { if (!PostWithinTimeSpan(post)) { continue; } if (post.type == "answer" && (!tags.Any() || post.tags.Any(x => tags.Contains(x, StringComparer.OrdinalIgnoreCase)))) { if (CheckIfDownloadRebloggedPosts(post)) { string textBody = tumblrJsonParser.ParseAnswer(post); AddToDownloadList(new AnswerPost(textBody, post.id)); AddToJsonQueue(new TumblrCrawlerData <Post>(Path.ChangeExtension(post.id, ".json"), post)); } } } } }