Invoking screen-scraper via .NET

Overview

If you're using Visual Studio 2008 or later, the project 'Target Framework' will need to be set to .NET 3.5 or later. However, do not use any .NET client frameworks since they do not have the required libraries for your project to compile.

A C# application interacts with screen-scraper via the Screenscraper.RemoteScrapingSession class. You can utilize the this class by compiling with a reference to the misc/dotNET folder of your screen-scraper distribution.

screen-scraper needs to be running as a server before invoking it from a .NET class.

RemoteScrapingSession Methods

The following is a reference for all of the methods found in the RemoteScrapingSession class.

It is also possible to store data sets and data records in session variables, which can then be accessed via the RemoteScrapingSession class. Data set objects are analogous to database result sets and data records are analogous to individual records within a result set. When an extractor pattern is applied a data set of data record objects is generated. Storing the resulting data set in a session variable (within a screen-scraper script) will allow for it to be accessed via a RemoteScrapingSession.GetVariable call.

The data record class (Screenscraper.DataRecord) simply extends Microsoft's Hashtable.

DataSet Methods

The following is a reference for all of the methods found in the DataSet class (Screenscraper.DataSet).

Examples

For an example of using the .NET driver please see Tutorial 4: Scraping an E-commerce Site from External Programs.