Posted by & filed under Open Source, PHP.

Open Sourcing my PHP Web Scraper

PHP Web Scraping Engine

I started this project in January 2011. It was going to be an easy to use web scraper that anyone could configure. It has an attractive GUI interface using jQuery UI elements.

URL Definition Screenshot

URL Definition Screenshot

The selectors can be entered using three different methods; the first is the tried and true regular expression method. The second, which is the easiest and most powerful to use, is CSS selectors. Someone could visit the pages they want to scrape, use their developer console to debug some selectors, and then toss them into the engine. The third method is a simplified regex syntax I call asterisk, where the user enteres the start string and the end string and an asterisk in the middle.

Capture Screenshot

Capture Screenshot

There is also an easy to use configuration screen for data storage. The engine was going to be smart enough to build different mysql tables and even build the relationshipts between the data. Or, data could be stored in XML or JSON documents, and a hierarchy would be maintained.

Output Screenshot

Output Screenshot

But, I never finished the project.

This repo is a hodge podge of code, rather unorganized. I haven’t been through it in a while, there might actually be two distinct code bases in here.

It is now released under the BSD license.

Thomas Hunter II

Support Thomas on Patreon. Thomas is the author of Advanced Microservices and a prolific public speaker with a passion for reducing complex problems into simple language and diagrams. His career includes working at Fortune 50's in the Midwest, co-founding a successful startup, and everything in between.

Latest posts by Thomas Hunter II (see all)

(Visited 1,183 times, 6 visits today)

Tags: