Skip to content

jhob101/guardian-crossword-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guardian Quick Crossword Downloader

Download Guardian Quick Crossword for the current day to Google Drive.
Downloads the Observer Speedy on Sundays.

I then sync my SuperNote eInk tablet with Google Drive which downloads the crossword to the device.

Authenticate with Google

Follow this guide to set up OAuth for Google Drive.

Save the client_secrets.json to the same directory as main.py

Install Python Modules

pip install pydrive
pip install python-dotenv

Create .env file

Copy .env.example to .env and replace the GDRIVE_DIRECTORY value with the Google Drive Folder ID of the directory you want the crosswords to upload to.

I have mine uploading to /Supernote/Document/Crosswords which my Supernote syncs with.

Create & navigate to the directory in GDrive and then copy the ID from the end of the URL and paste this into the .env file:

https://drive.google.com/drive/folders/18D_PklYFxR-Kfgugq_c8nNRpRoOseZ_z

.env file should look something like this:

GDRIVE_DIRECTORY=18D_PklYFxR-Kfgugq_c8nNRpRoOseZ_z

Run the script for the first time

python main.py

When first run you will be prompted to authenticate with Google. Credentials will then be saved to credentials.txt so that authentication is not required every time the script is run.

The script will also create a /crosswords sub-directory to save the last downloaded crossword to.

Setup as cron

Run every hour between 00:30 and 06:30 (just in case it fails on earlier run)

30 0-6 * * * python3 /home/pi/Python_Code/guardian-crossword-downloader/main.py

I run it on an always-on RaspberryPi.

All Set!

From then on the script should chug away happily downloading the crosswords to your Google Drive.

Happy Crosswording!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages