Parsing web sites

2.1 2021-08-06 05:57 UTC

This package is auto-updated.

Last update: 2024-11-06 13:43:00 UTC


README

Telegram GitHub release (latest by date)

GitHub followers GitHub forks GitHub Repo stars GitHub watchers

Ishlatish

Composer orqali yuklab olish

composer require khamdullaevuz/parser

Ulanish

require_once __DIR__.'/vendor/autoload.php';

use KhamdullaevUz\Parser\Scraper;

$parser = new Scraper;

Github orqali yuklab olish

git clone https://github.com/khamdullaevuz/parser

Ulanish

require_once __DIR__.'/src/Scraper.php';

use KhamdullaevUz\Parser\Scraper;

$parser = new Scraper;

Contentni olish

$data = $parser->getContent("https://khamdullaev.uz");

Olingan kontentni bo'laklarga ajratish

$ex = $parser->exp($data);

Bunda $ex[qator] (ya'ni qator o'rnida ma'lumot qatori ko'rinishida) ishlatiladi.

Bo'laklardan ma'lumotni kesib olish

$info = $parser->cut($ex[1], "<h1>", "</h1>");

Examples:

Examples: example

Created by: Elbek Khamdullaev