Downloading Daily Newspapers Automatically
Sometimes things get busy – you’re commuting, jet setting or simply inundated. It would be nice to catch up with the local paper but then again, who has time these days to get out of the office and grab a copy?
On a regular basis, I like to grab the free dailies and see what’s up. In Vancouver, The Metro and 24 Hours News keep me up to date. When I travel to another city, usually I’ll check and see what’s up online. Now, you can have the best of both worlds.
I’ve written a script that uses the freely distributable wget program that will download the newspapers in PDF format for you with the touch of a button. You simply need to know where the PDF files are.
You can get the code or download a ZIP file that does it all for you after the jump.Here’s an example of the code with the actual locations stripped out:
Works under Windows – make sure you have wget in the same directory. Works even better if you actually schedule it to run at 5am every day.
@echo off
rem download the latest metro from metropoint
wget http://metropoint.metro.lu/… -O output-Metro.pdf
rem download the latest 24hrs from their download folder
wget http://vancouver.24hrs.ca/… -O output-24.pdf
pause
You need to add code (%date:~10%%date:~4,2%%date:~7,2%) to dynamically change the date for the paper so you get the freshest version all the time – make sure your computer’s date is also set properly. You can download an ZIP file with all the tools you’ll need, HERE. Simply schedule it and let ‘er rip.
