jafaripur/varzesh3-crawler

This package is abandoned and no longer maintained. No replacement package was suggested.

Crawler for varzesh3.com livescore

dev-master 2016-06-11 13:09 UTC

This package is not auto-updated.

Last update: 2022-01-08 20:54:54 UTC


README

Varzesh3.com one of popular sport news agency in Iran. This crawler fetch the infomation from this website.

Install

Install using composer:

composer require "jafaripur/varzesh3-crawler"

Usage

After installing add this line in top of page

use jafaripur\varzesh3\Varzesh3Crawler;

And create new instance from Varzesh3Crawler

$crawler = new Varzesh3Crawler();

If you want to add fetching url use this one

$crawler = new Varzesh3Crawler('http://www.varzesh3.com/livescore');

Livescore

Fetching livescore for football

$crawler = new Varzesh3Crawler();
$data = $crawler->getFootballLiveScore();

for fetch all available sport like an footbal, volleyball,...

$data = $crawler->getLiveScore();

The structure of $data variable similar to this one for football score:

(
    [start_time] => start time
    [start_date] => start date
    [match_status] => match status, time or finished,...
    [team_right] => Array
        (
            [name] => right team name
            [score] => socre to this time
        )
    [team_left] => Array
    (
        [name] => left team name
        [score] => socre to this time
    )
    [events] => Array
    (
        [team_left] => Array
        (
            [name] => name of event like an goal, own_goal,...
            [time] => time of event
            [player] => name of player
        )
        [team_right] => Array
        (
            [name] => name of event like an goal, own_goal,...
            [time] => time of event
            [player] => name of player
        )
    )
)