structured_scraper/example/README.md

27 lines
1.0 KiB
Markdown
Raw Normal View History

2022-01-08 15:23:02 +01:00
# Esempio
Copia questa cartella nel tuo web server in modo che sia raggiungibile ad esempio a questa URL:
`
http://localhost/example
`
2022-01-08 15:36:00 +01:00
Copia anche il file `example/config.php` nella root dello scraper, così da configurare l'URL e come filtri di ricerca ad ogni livello di profondità un semplice tag `<a>` per il test.
2022-01-08 20:39:22 +01:00
Inserendo negli `$start_url` l'indirizzo sopra e avviando lo script, dovreste trovare nella cartella `pdf/` il file `test.pdf` e l'output dovrebbe essere il seguente:
2022-01-08 15:23:02 +01:00
```
2022-01-08 15:54:22 +01:00
[0] http://localhost/example
[1] http://localhost/example/pagina1
[1] http://localhost/example/pagina2
[2] http://localhost/example/pagina1/sub1.1
[2] http://localhost/example/pagina1/sub1.2
[2] http://localhost/example/pagina1/sub1.3
[2] http://localhost/example/pagina2/sub2.1
[2] http://localhost/example/pagina2/sub2.2
[2] http://localhost/example/pagina2/sub2.3
[3] http://localhost/example/pagina1/sub1.1/subsub1.1.1
[3] http://localhost/example/pagina1/sub1.1/subsub1.1.2
2022-01-08 20:41:41 +01:00
[3] http://localhost/example/pagina1/sub1.1/test.pdf
[*] Downloading test.pdf
2022-01-08 15:23:02 +01:00
```