Exemplo n.º 1
0
        private void AddVideoUrlToDownloadList(Post post)
        {
            if (!Blog.DownloadVideo)
            {
                return;
            }

            Post postCopy = post;

            if (post.type == "video")
            {
                AddVideoUrl(post);

                postCopy           = (Post)post.Clone();
                postCopy.video_url = string.Empty;
            }

            //var videoUrls = new HashSet<string>();

            AddTumblrVideoUrl(InlineSearch(postCopy));
            AddInlineTumblrVideoUrl(InlineSearch(postCopy), TumblrParser.GetTumblrVVideoUrlRegex());
            if (Blog.RegExVideos)
            {
                AddGenericInlineVideoUrl(postCopy);
            }

            //AddInlineVideoUrlsToDownloader(videoUrls, postCopy);
        }
Exemplo n.º 2
0
        private void AddVideoUrlToDownloadList(string document)
        {
            if (!Blog.DownloadVideo)
            {
                return;
            }

            AddTumblrVideoUrl(document);
            AddInlineTumblrVideoUrl(document, TumblrParser.GetTumblrVVideoUrlRegex());

            if (Blog.RegExVideos)
            {
                AddGenericVideoUrl(document);
            }
        }
Exemplo n.º 3
0
        private void AddVideoUrlToDownloadList(string document)
        {
            if (!Blog.DownloadVideo && !Blog.DownloadVideoThumbnail)
            {
                return;
            }

            var post = new Post()
            {
                Id = "", Tumblelog = new TumbleLog2()
                {
                    Name = ""
                },
                UnixTimestamp = (int)((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds()
            };

            AddTumblrVideoUrl(document, post);
            AddInlineTumblrVideoUrl(document, TumblrParser.GetTumblrVVideoUrlRegex(), TumblrParser.GetTumblrThumbnailUrlRegex());

            if (Blog.DownloadVideo && Blog.RegExVideos)
            {
                AddGenericVideoUrl(document, post);
            }
        }