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.
|
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.aspxInside the event handler you can set e.Canceled based on e.Request.ResourceType. Thanks!
|
Rank: Newbie Groups: Member
Joined: 10/10/2015 Posts: 7
|
Thanks for the heads up! It's working now.
|