Skip to content

A web scraper taking as arguments a list of URLs and a list of XPath queries to perform on each document. Returns an instance of DataInterface.

License

Notifications You must be signed in to change notification settings

opportus/web-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Scraper

A web scraper taking as arguments a list of URIs and a list of XPath queries to perform on each document. Returns an instance of DataInterface.

Installation

$ composer require opportus/web-scraper

Usage

Use Opportus\WebScraper\WebScraper;

$uris = [
    'https://en.wikipedia.org/wiki/Web_scraping',
    'https://en.wikipedia.org/wiki/XPath',
];

$queries = [
    '//p[1][node()]',
    '//div[@id="mw-normal-catlinks"]/ul//li[node()]',
];

$scraper = new WebScraper();

$data = $scraper->scrap($uris, $queries); // @see https://github.com/opportus/web-scraper/blob/master/src/DataInterface.php

About

A web scraper taking as arguments a list of URLs and a list of XPath queries to perform on each document. Returns an instance of DataInterface.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages