开发者

Html agility pack issue when getting title and images from external web url

开发者 https://www.devze.com 2023-03-06 03:30 出处:网络
I am using HTML agility DL开发者_如何学CL for getting images and title of external website link.

I am using HTML agility DL开发者_如何学CL for getting images and title of external website link. when I try to load title from the website. http://www.gettyimages.com then I getting wrong title. I getting title "Getty Images - Unsupported browser detected "

whats going wrong?


I don't think it has anything to to with the Html Agility Pack. It seems that Getty Images checks your request's "User-Agent" http header and changes the title of the returned HTML. You can try pretending to be Firefox/IE by changing the user agent to work around that or just cut it off.

See http://www.dotnetperls.com/webclient for an example using WebClient to download the content.

0

精彩评论

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

关注公众号