tibinsunny/easyscrape

A Library which can easily scrape website 🚀

1.0 2021-02-16 13:08 UTC

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