Script in Python to check if new software version is available for Kindle Paperwhite 4 (or any other model after you change a couple of variables). Just a simple proof of concept project.
To look for updates for other Kindle models change 2 variables:
- update URL in
update_file_url
- change selector in
getLatestVersion
A bit of context why I made it: Kindle doesn't offer an option to check for updates straight from the device so either:
- Amazon releases new version and Kindle will automatically download it when connected to network after ~ 2 months from initial release,
- ^ sometimes it doesn't work or you don't want to wait, so you may want to download .bin file manually from the website, copy to your device and then install it.
Option 2) means every now and then you have to check Amazon's website. That gave me an idea to write a script which will automate that.
Program crawls and scrapes the website, extracts current software version using regex, compares with already installed on my device (assuming I know version number) and if it's newer, then automatically downloads the .bin file. No need to visit a single page 🤓
- 1.2.1: New library used for displaying Windows notifications.
- 1.2: Fixed selector; removed sound from macOS notifications.
- 1.1.2: Fixed icons not working (and changed them).
- 1.1.1: Fix for a bug when launching via SwiftBar.
- 1.1.0: Fixed selector so it now works; tweaked a few minor things; added a possibility to open the URL of newest version file from notification.
- 1.0: Re-wrote the script so it works with the updated Amazon website; supports both macOS and Windows; supports notifications on both platforms; added input timeout.
Using SemVer.
- Scraping data with Beautiful Soup
- inputimeout
- Windows notifications done with: plyer
- macOS notifications done with: pync
- Colored text in the terminal: colorama
- Colored text in the terminal: termcolor
- Icons from Flaticon
- Icons hosted on ImgBB
- .png → .ico conversion with CloudConvert
If you found a bug or want to propose a feature, feel free to visit the Issues page.