dev-master
9999999-devPHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at.
MIT
The Requires
- php >=7.1
- ext-tidy *
- ext-curl *
- nette/tester 1.7.x
by Pavol Biely
Wallogit.com
2017 © Pedro Peláez
PHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at.
PHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at., (*2)
Use composer to install this package., (*3)
$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";
}
$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";
}
}
Tests are build with Nette Tester. You can run it like this:, (*4)
tester.bat -c php.ini-win --coverage coverage.html --coverage-src ../src
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., (*5)
MIT License (c) Pavol Biely, (*6)
Read the provided LICENSE file for details., (*7)
PHP Crawler for downloading ads and categories from bazos.sk, bazos.cz or bazos.at.
MIT