开发者

how to download the image which will be displayed after a cache image on the web page?

开发者 https://www.devze.com 2023-02-12 04:54 出处:网络
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.

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 imag开发者_开发知识库e rather than the one,B.jpg, which I want.

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

Thanks in advance.

ps: I have posted this qustion for more than 48 hours, and only got a few of answers which don't solve my problem. I am wondering that why there are only 2 people posted their answers? Is my question not clear? If any, please let me know.

Thanks


EDIT: Original answer removed since I misunderstood the question entirely.

What you want to do is basically HTML scraping: using the actual html of the page to discover where files are hosted and download them. Because I'm not sure if there are any legal reasons that would prevent you from downloading the image files in this manner, I'm just going to outline an approach to doing this and not provide any working samples or anything. In other words, use this information at your own risk.

Using fiddler2 in Firefox, you should be able to find the domain and full url that one of the images is downloaded from. Basically just start fiddler2, navigate to the site in firefox, and then look for the biggest file that is downloaded. That will tell you exactly where the image is coming from.

Next, take a look at the HTML source code for the page you are viewing. The way this particular site works, it looks like it hides the previous/next downloads in a swf or something, but you can find the urls in the javascript for the page. Look for a javascript array called picArr.

To download these using a WinForms app, I would use the WebRequest object. Create a request for each image url and save the response to disk.

0

精彩评论

暂无评论...
验证码 换一张
取 消