Skip to content

PHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at.

License

Notifications You must be signed in to change notification settings

michalfapso/bazos-crawler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bazos - PHP Crawler

Build Status Coverage Status

PHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at.

Usage

Use composer to install this package.

Download ads from single category

$crawler = new Bazos\Crawler();

$items = $crawler->crawlAds('https://auto.bazos.sk/', 5); // 5 means number of pages to parse, default is 1

foreach ($items as $item) {
    echo $item->getTitle() . "\n";
}

Download ads from all categories

$crawler = new Bazos\Crawler();

$categories = $crawler->crawlCategories($crawler::URL_SK);

foreach ($categories as $category) {
	$items = $crawler->crawlAds($category->getLink(), 5); // 5 means number of pages to parse, default is 1

	foreach ($items as $item) {
	    echo $item->getTitle() . "\n";
	}
}

How to run tests?

Tests are build with Nette Tester. You can run it like this:

tester.bat -c php.ini-win --coverage coverage.html --coverage-src ../src

Minimum requirements

  • PHP 7.1+
  • ext-curl
  • ext-tidy

Disclaimer

Please do not abuse the Bazos portal. I've developed this crawler just for tracking bike ads where I was looking for the one someone stole from me.

License

MIT License (c) Pavol Biely

Read the provided LICENSE file for details.

About

PHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.2%
  • Batchfile 0.8%