Separazione file config
This commit is contained in:
parent
9db2ec22d9
commit
d62aa375b8
10
config.example.php
Normal file
10
config.example.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$start_url = 'https://www.iltuocomune.it/amministrazione-trasparente-url';
|
||||||
|
|
||||||
|
$filters = [
|
||||||
|
'//td[@class="actions"]/a[@title="Visualizza "]',
|
||||||
|
'//table[@class="allegati"]/a[@title="Download versione non firmata"]'
|
||||||
|
];
|
||||||
|
|
||||||
|
$download_dir = __DIR__.'/pdf';
|
@ -4,16 +4,7 @@ require __DIR__.'/vendor/autoload.php';
|
|||||||
|
|
||||||
use Scraping\Scraper;
|
use Scraping\Scraper;
|
||||||
|
|
||||||
$start_url = 'https://este.trasparenza-valutazione-merito.it/web/amministrazionetrasparente/papca-ap/-/papca/igrid/1452834656/1452816457';
|
|
||||||
|
|
||||||
$filters = [
|
|
||||||
'//td[@class="actions"]/a[@title="Visualizza Allegato"]',
|
|
||||||
'//table[@class="allegati"]/a[@title="Download versione non firmata"]'
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
$scraper = new Scraper();
|
$scraper = new Scraper();
|
||||||
$scraper->levels = count($filters);
|
|
||||||
|
|
||||||
foreach ($filters as $i => $filter) {
|
foreach ($filters as $i => $filter) {
|
||||||
$scraper->scrape('GET', $start_url, $filters, $i);
|
$scraper->scrape('GET', $start_url, $filters, $i);
|
||||||
|
Loading…
Reference in New Issue
Block a user