11-29-2023, 02:36 PM | #1 |
Guru
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
Kobo store price comparisons
I wrote a little perl script to help me find which Kobo "country" store gives the cheapest prices for a book. It might be helpful to others.
GitHub gist To use it, find the book you're interested in on the store, and pass the entire URL to the script. e.g. Code:
kobocompare https://www.kobo.com/us/en/ebook/alliance-rising-1 I've hardcoded a set of currency conversions to GBP, which obviously could be improved by someone. Equally obviously it could check each store in parallel instead of one at a time. Patches welcome, as they say. |
12-01-2023, 08:20 PM | #2 |
Absentminded Reader
Posts: 1,287
Karma: 6916983
Join Date: Apr 2017
Device: Kobo Mini, Libra Colour & Elipsa; Kindle Paperwhite 3 & 4; iOS apps
|
That seems handy, but don’t you require a separate account for each Kobo store? I have one for Japan and another for the US and their accounts and libraries are separate. I’ve held off creating a Canadian account for that reason, though if I buy it cheap from Canada (they have more sales, the bums! Haha), I could always strip the DRM and sideload it into my US Kobo.
I’m curious how you utilize this script. |
Advert | |
|
12-01-2023, 11:49 PM | #3 |
Wizard
Posts: 1,436
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
|
You can "travel" on the Kobo store by changing your country and using PayPal so you don't have to enter a billing address.
|
12-02-2023, 06:00 AM | #4 |
Guru
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
Kobo's Japan store might be different, but so far I've successfully bought books from India, Switzerland, Spain, Turkey, Norway all by:
Or in other words from experience Kobo's DRM just locks you to an account (an email address) and not a billing address/country/store. Last edited by chrisridd; 12-02-2023 at 06:01 AM. Reason: formatting |
12-02-2023, 06:05 AM | #5 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
12-02-2023, 06:06 AM | #6 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
12-02-2023, 11:39 AM | #7 |
Guru
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
|
07-02-2024, 01:02 PM | #8 |
Guru
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
Sadly this script no longer works due to changes on kobo.com. The website now seems to return a page full of Javascript that you have to execute to get the "real" web page.
Maybe it is possible to rewrite it as a Javascript "bookmarklet" for your web browser? Help from Javascripting gurus is welcomed! |
07-12-2024, 06:08 PM | #9 |
Cantankerous Contrarian
Posts: 136
Karma: 506950
Join Date: Mar 2014
Location: ::1
Device: Kobo Sage 32gb, Kindle Paperwhite
|
I may be able to do this. It might be a little while as I am pretty busy, but looking at this Perl script it shouldn't be too hard- both Python and Perl are scripting languages and I work with Python a lot at my job.
|
07-12-2024, 06:18 PM | #10 |
Guru
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
I’d be interested in seeing what you come up with.
The pages I seem to download now are from Cloudflare and just contain lots of JavaScript which needs to be executed. Some of that seems to be to compute complex json requests to other URLs which then give some actual HTML. Hence running it inside an actual browser, or maybe node.js (?) might be needed. |
07-12-2024, 06:24 PM | #11 |
Cantankerous Contrarian
Posts: 136
Karma: 506950
Join Date: Mar 2014
Location: ::1
Device: Kobo Sage 32gb, Kindle Paperwhite
|
Yeah. If you still want to use JavaScript, you could use something like Puppeteer which is a headless Chromium web scraper, much like Selenium and Beautiful Soup for Python. In fact using Puppeteer if you're wanting to keep it JavaScript would probably save you some time and headaches.
I wrote a broken script for Puppeteer which is in this GitHub gist, just to give you a feel for how it works: https://gist.github.com/twhite96/38b...05de2990dcbb9c I am not sure how to share the automation with the community though. Maybe the creator of Calibre has some ideas? I think I have his name right but don't want to misspell it in this comment. The docs are here: https://pptr.dev/ Last edited by sydmalicious; 07-12-2024 at 06:25 PM. Reason: Context for links |
07-12-2024, 06:27 PM | #12 | |
Cantankerous Contrarian
Posts: 136
Karma: 506950
Join Date: Mar 2014
Location: ::1
Device: Kobo Sage 32gb, Kindle Paperwhite
|
Quote:
|
|
07-12-2024, 06:33 PM | #13 |
Cantankerous Contrarian
Posts: 136
Karma: 506950
Join Date: Mar 2014
Location: ::1
Device: Kobo Sage 32gb, Kindle Paperwhite
|
I ran the cURL command cURL -I -L <kobo url> and the response is a 403 HTTP code which means it is forbidden. The headers indicate to me that, like I wrote in the previous reply, they are behind Cloudflare's WAF and the only way to get the data would be behind a proxy, if that. I don't think this can be done easily.
|
07-16-2024, 04:24 PM | #14 |
Member
Posts: 19
Karma: 29470
Join Date: Jul 2024
Location: Ukraine
Device: Kobo Libra 2
|
Kobo Price!
Hi all!
TLDR: install userscript or Firefox/Chrome extension and go to book page. After a couple of minutes you will get a list of all available prices for different countries. Let me introduce you the Kobo Price! A small userscript that automate price comparison for you. It will try to gather all available country prices, convert them to USD, sort and present them on book page. You just need to open book/audiobook page, wait a couple of minutes (waiting time is highly depends on your connection and PC performance) and get a list on the right side of the page. You have a couple of options how you can install and use it right now: 1. Easiest way (not sure, honestly) is to download userscript and add it to Tampermonkey/Violentmonkey/Greasemonkey. 1.1 Download one of the following extensions for your browser: https://violentmonkey.github.io/ https://www.greasespot.net/ https://www.tampermonkey.net/ 1.2 Go to koboprice.user.js and click "raw" on the right side 1.3 If extension don't recognize it as userscript and don't open window for importing it simpy copy and add it manually. You can find out how to do it in the extension docs. 1.4 That's it. You can now go to the book page and test it 2. Install the Kobo Price extension. Right now I go to the finish line only with Chrome extension so you can grab it here: Kobo Price Chrome 2.1 For the Firefox - I'm in the process of review and getting approval from the Firefox itself. So no public extension for now. But! I'm attaching self signed extension below that you can import manually. Just open it in the Firefox and it should show you prompt with confirmation. 3. Build extension from sources yourself and sideload it. Maybe I will add instructions in the future, if someone will have interest in tinkering with it or submitting changes. In two words: get it run PHP Code:
Some notes: - You can open developer tools in the browser, go to console and filter messages by "KOBOPRICE". You will see how and what prices are loading right now. - Prices are cached as well as the currency rates in your browser localstorage. You can go to the page several times, safely reload it and script will continue from where it left. After all prices are loaded the will show immediately on the page. Prices are cached for one day so, be sure to check your favorite book every morning. If something not working as expected you can go to localstorage tab in your brawser developer tools and without hesitation delete "KOBOPRICE" key. - I've managed to test it on Firefox for Android. So if you are really lazy as I am you can install Firefox extension or userscript on your phone. If you find out how to do it Any suggestions are welcome, please test it and say what you think. Also, what to highlight that this "lifehack" will not survive for long. I think it was possible to do the same steps with Amazon, to get lowest price from different stores. But after sometime they make it nearly impossible to change your billing address to bypass their price inequality. But the war with the monopolies is not over! We will prevail! kobo_price-1.1.9.xpi Last edited by fotonmoton; 07-16-2024 at 04:28 PM. |
07-16-2024, 05:42 PM | #15 |
Guru
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
|
Really nice work! I will be trying this out tomorrow.
|
Tags |
price, store |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo Clara HD and Libra 2 Comparisons and Questions | Benjamelon | Which one should I buy? | 8 | 12-28-2021 08:33 PM |
PRS-T1 Price Reduction at Sony Store to $129 | advocate2 | Sony Reader | 60 | 12-06-2011 09:45 AM |
Kobo Store Price Increases | wildstar | Kobo Reader | 17 | 12-14-2010 04:08 AM |
Ebook price comparisons | spinoza | News | 47 | 09-13-2009 01:33 PM |
Sony eBook Store Price Drop? | scarter | News | 9 | 08-23-2009 10:18 PM |