Soup is a frameworks for scrapping HTML. It offers a simplified query mechanism to abstract over the XML and HTML structures of a document.
web query XML HTML scrapping
It is composed of some keys classes:
SoupElement is the root of elements that are extracted during the parsing of an HTML document. Contrary to traditional HTML Parser, Soup produces a limited set of elements which approximate the HTML elements but supports querying and extracting information.
Soup is the main public class of the package. It is the class to interact with as shown by the tests.
The best way to get started is to get a soup of html elements using Soup class>>fromString: as follows:
Soup fromString: 'http://www.bedetheque.com/album-105582-BD-Atomium-Express.html' asUrl retrieveContentsTests of the
Soup class are the place to start to learn the API.
The main repository is: http://www.smalltalkhub.com/mc/PharoExtras/Soup/main
MCHttpRepository location: http://www.smalltalkhub.com/mc/PharoExtras/Soup/main user: '' password: ''
stable: spec <symbolicVersion: #'stable'> spec for: #'pharo1.3.x' version: '0.2'. spec for: #'pharo1.4.x' version: '0.2'. spec for: #'pharo2.x' version: '1.4'. spec for: #'pharo3.x' version: '1.4'.
(ConfigurationOfSoup project version: #'stable') load (ConfigurationOfSoup project version: '1.4') load
21/02/2013 - Migrated to SmalltalkHub.
(ConfigurationOfSoup project version: '1.4') load
Adding better stable version.
(ConfigurationOfSoup project version: '1.3') load
Todo: update when XMLSupport will be migrated to Smalltalk.