Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including openscraping with all npm packages installed. Try it out:

// This example file assumes you installed openscraping through npm in a new separate project // using the command: npm install openscraping var openscraping = require('openscraping') var config = ` { "title": "//h1", "body": "//div[contains(@class, 'article')]" } ` var html = '<html><body><h1>Article title</h1><div class="article">Article contents</div></body></html>' var scrapingResults = openscraping.parse(JSON.parse(config), html) console.log('Extracted title: ' + scrapingResults.title) console.log('Extracted body: ' + scrapingResults.body) console.log('Full extracted json: ' + JSON.stringify(scrapingResults))

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

openscraping v0.3.1

Turn unstructured HTML pages into structured data. The OpenScraping library can extract information from HTML pages using a JSON config file with xPath rules. It can scrape even multi-level complex objects such as tables and forum posts.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free