Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser programmatically cancel download Options
Brass9
Posted: Tuesday, June 7, 2016 11:25:49 AM
Rank: Newbie
Groups: Member

Joined: 10/10/2015
Posts: 7
I am building a scraper for sites protected by incapsula CDN. I just need to extract the main HTML and not the CSS/JS/IMG resources linked in that page.

How do I cancel loading the linked resource objects?

I've tried capturing the webView.BeforeNavigate() event (using Response.NewURL property) - but to no avail.

Sample code will be appreciated.
eo_support
Posted: Tuesday, June 7, 2016 11:29:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You would handle this event:

http://www.essentialobjects.com/doc/eo.webbrowser.webview.beforerequestload.aspx

Inside the event handler you can set e.Canceled based on e.Request.ResourceType.

Thanks!
Brass9
Posted: Tuesday, June 7, 2016 11:45:49 AM
Rank: Newbie
Groups: Member

Joined: 10/10/2015
Posts: 7
Thanks for the heads up! It's working now.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.