Use this to automatically scrape all of your saved Instapaper articles locally as HTML and PDF files. I originally wrote this to read my saved documents on my reMarkable tablet. Instapaper does not have an option to export all my stuff as PDF as far as I could tell (the built-in options only export a subset).
You will need to have the following packages installed:
Configure your username and password, then run the script. It will go through all articles shown on your home page and download the copy Instapaper has stored into a folder called output
as HTML file and convert it into a PDF. You can customize the look by updating the included styles.css
file. Any errors will be reported and logged to failed.txt
. Errors might be due to parsing errors on Instapaper's side or due to PDF conversion issues. I am not sure on how to fix the first, but the script will retry a couple of times in the second case.
On my computer this took about 1-10 seconds per article and up to a minute when PDFs needed to be remade. You might need to quit and rerun if it takes longer than that. It should resume from where it left off if it detects a PDF has already been created. This was written in an afternoon, apologies for any issues.