Publication Details
Scraping Data from Web Pages using SPARQL Queries
Web scraping, Page rendering, Data extraction, RDF, SPARQL
Despite the increasing use of semantic data, plain old HTML web pages often provide a unique interface for accessing data from many domains. To use this data in computer applications or to integrate it with other data sources, it must be extracted from the HTML code. Currently, this is typically done by single-purpose programs called scrapers. For each data source, specific scrapers must be created, which requires a thorough analysis of the source page's implementation in HTML. This makes writing and maintaining a set of scrapers a complex and time-consuming task. In this paper, we present an alternative approach that allows defining scrapers based on visual properties of the presented content instead of the HTML code structure. First, we render the source page and create an RDF graph that describes the visual properties of every piece of the displayed content. Next, we use SPARQL to query the model and extract the data. As we demonstrate with real-world examples, this approach allows us to easily define more robust scrapers that can be used across multiple web sites and that that better cope with changes in the source documents.
@INPROCEEDINGS{FITPUB12958, author = "Radek Burget", title = "Scraping Data from Web Pages using SPARQL Queries", pages = "293--300", booktitle = "Web Engineering - 23rd International Conference, ICWE 2023", series = "Lecture Notes in Computer Science", year = 2023, location = "Alicante, ES", publisher = "Springer Nature Switzerland AG", ISBN = "978-3-031-34443-5", doi = "10.1007/978-3-031-34444-2\_21", language = "english", url = "https://www.fit.vut.cz/research/publication/12958" }