tibinsunny / easyscrape
A Library which can easily scrape website 🚀
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-17 02:07:01 UTC
README
Easyscrape is a simple php library which allows you to scrape website based on the DOM elements. All you need to know is the exact HTML tag in which the data is displayed.
Installation 💻
composer require tibinsunny/easyscrape
Usage 🔨
$instance = new easyScrape();
$result=$instance->scrapeNow(URL,STARTING_TAG,ENDING_TAG);
URL should have http/https protocol
Sample Code âš™
<?php
require_once __DIR__ . './vendor/autoload.php';
use easyScrape\easyScrape;
$instance = new easyScrape();
$result=$instance->scrapeNow('https://www.google.com','<title>','</title>');
var_dump($result)
?>
The above code dumps an array which contains the title "Google" as the function is asked to scrape the "TITLE" tag of google.com