khamdullaevuz / parser
Parsing web sites
2.1
2021-08-06 05:57 UTC
README
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