如何下载在网页上缓存图像后将显示的图像? [英] how to download the image which will be displayed after a caching image on the web page?

查看:61
本文介绍了如何下载在网页上缓存图像后将显示的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想从卡通网站下载图像.而我的应用是WinForm,而不是WebForm.

因此,假设a.html上有一张图片.

通常,当我单击上一页并重定向到此页面时,将在同一块中显示一个图像:正在加载图像",例如A.jpg.

5秒后,将显示真实的图像,例如B.jpg.

所以我得到的只是缓存图像,而不是我想要的图像B.jpg.

所以.....我应该怎么做?

提前谢谢.

我正在使用HtmlAgilePack检索html内容.

Hi guys,

I want to download an image from a cartoon website. and my app is WinForm, not WebForm.

So let''s say that there is an image on the a.html.

Normally, when I click the previous page and am redirected to this page, there will be a image :"image is loading", let''s say A.jpg, in the same block.

After 5 seconds, the real one, let''s say B.jpg, will be displayed.

So what I got is only the caching image rather than the one, B.jpg, which I want.

So..... how should I do it?

Thanks in advance.

I am using HtmlAgilePack to retrieve the html content.

//this url is about the whole html page
public static string getImageURL(string url)
        {
            string content1 = getPageContent(url);
            HtmlDocument doc = new HtmlDocument();
            doc.LoadHtml(content1);
            HtmlNode img = doc.DocumentNode.DescendantNodes().SingleOrDefault<HtmlNode>(x => x.Id.Equals("showImg"));
            string imgURL = img.GetAttributeValue("src", "");
            return imgURL;

}


通过这种方式,我得到了imgURL ="/src/caching.gif"
但是真正的事情是另一回事.


by doing it in this way, I got imgURL = "/src/caching.gif"
but the real one is other thing.

推荐答案

没人知道答案吗????
> _< ;;;
Nobody knows the answer?????
>_<;;


这篇关于如何下载在网页上缓存图像后将显示的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆