Apr 022018 Tagged with , , , 0 Responses

Content Grabber – Useful Custom Scripts

Content Grabber has powerful custom scripting using which you can customize Content Grabber behavior and develop power full web scraping agent that can crawl and scrape data from simple to very complex websites.

Below are few example of custom script using C# which shows database connection and dynamically run time Xpath modification when scraper running. 

Initialization Script

This script initialize the Global variable counter using args.GlobalData

 

Database Connection and Insert Script Example

This script can be used to Insert data to MySQL database.

 

Modify Xpath at Runtime

This can be used to dynamically change Xpath of Click Action, Link Navigation and other Commands that need Xpath to Interact with Browser.

 

Downloading Full HTML page on Disk

Using this script full HTML page can we downloaded on local disk so that can be used to parse data again if something missed while scraping instead of making website request again and consuming their bandwidth.  This is ideal work flow practice for Web Scraping to avoid any problem if realized at the end that something was missed during data crawling.

 

Leave a Reply

Your email address will not be published. Please enter your name, email and a comment.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">