开发者

c# download file from a site that redirects such as Filehippo

I'm creating some C# software that looks for the latest software online and downloads it if a newer version is available.

Downloading an exe from ftp or http is not a problem but some sites such as filehippo redirects your request i.e.

http://www.filehippo.com/download_ad-aware/

Is there a way I can still download this file? The reason for filehippo is that it keeps all software on the same url 开发者_JAVA技巧so if a newer version is available I can still visit the same url each time to download it manually.

Thanks


You will have to scrape the page to actually grab the URL. In the case of File Hippo, you can always get the Download Latest Version URL from the page. But keep in mind that if the site structure changes and the criteria that you use to scrape the page changes, you will have to update your software as well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜