View Single Post
Old 07-27-2021, 02:42 PM   #545
Twirlip
Junior Member
Twirlip began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite Gen 7
Is there an easy way to get Amazon Kindle book purchase dates into Calibre?

Is there an easy way to get Amazon Kindle book purchase dates into Calibre? The purchase dates are on Amazon's "Manage Your Content and Devices" webpage.

I couldn't get Import List's web page option to work - I get "Failed to run load_page_in_browser" (someone mentioned it doesn't work on pages that require authentication). I also couldn't get the clipboard option to work - I think because when I copy from the web page, metadata from a single book is spread over multiple lines of text (see below).

I finally managed to copy from the webpage to a text file, use a Python EBNF parser (attached) to convert to CSV, then use the CSV option to import to Calibre.

Did I miss a simpler option? Or could Import List be modified to allow importing of this kind of data? I would like to go straight from the Amazon webpage into Calibre, without messing about with intermediate files.

The cut-n-paste data I'm trying to read looks like this. The author(s) and purchase date are concatenated together. The "..." in the data are really there, that's not me eliding content. The single digits are the number of collections I've put the book in (which for me is none):
Code:
...
The Consuming Fire (The Interdependency Book 2) (English Edition) 
John Scalzi18 December 2019
0
...
The Collapsing Empire (The Interdependency Book 1) (English Edition) 
READ
John Scalzi10 December 2019
0
...
Shadow Captain (Revenger) (English Edition) 
Alastair Reynolds18 October 2019
0
...
Revenger (English Edition) 
Alastair Reynolds17 October 2019
0
...
Permafrost (English Edition) 
Update Available
Alastair Reynolds12 October 2019
0
This is from amazon.de (hence the reference to English editions), in case you get different results from other countries.

Finally, thanks to whoever for a really usefull plugin
Attached Files
File Type: py amazon_parse.py (1.3 KB, 274 views)
Twirlip is offline   Reply With Quote