Skip to content

chriscore/SplashSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SplashSharp

Splash is a javascript rendering service that can be ran in docker. It's a lightweight browser with an HTTP API, written by Scrapinghub.

SplashSharp is a C# client for talking to Splash instances.

Getting Started

// Create a new SplashClient for a splash instance running on localhost
var splash = new SplashClient("http://localhost:8050", new HttpClient());

// Get an HtmlAgilityPack HtmlDocument for a given Url
var splashResponse = await splash.RenderHtmlDocumentAsync(new RenderHtmlOptions 
{ 
	Url = "http://www.bbc.co.uk/news" 
});
var htmlDoc = splashResponse.Data;

// Display text of all h2 elements found on the page
var titles = htmlDoc.DocumentNode
	.SelectNodes("//h2").Select(n => n.InnerText);

About

C# client for Scrapinghub splash HTTP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages