A PHP script to extract / scrape data on school snow closures in a town. Built on hQuery.
Also, a badge-svg
PHP script & a school-closure
Javascript.
- Example data: index.json
composer install && composer npm-install
composer copy-env
composer build
composer test
composer serve
# And browse to ...
# http://localhost:8000/badge-svg/?s=Middleton%20Primary
# http://localhost:8000/badge-svg/?abbr=MP
I identify myself as the following User-Agent
(and I sleep between requests):
SchoolClosure/1.0-beta +https://github.com/nfreear/school-closure#bot
Example crontab (assumes the server is configured for your local time):
# crontab -l
# min hr dom mon day command
*/15 6-9 * * * /path/to/school-closure/bin/cron >/dev/null 2>&1
All data remains the property of the web-site publisher, and the web-site remains as the definitive/ master copy of the data. Use at your own risk. I accept no liability for losses.
code: © Nick Freear. License: MIT.