Jump to content

[Fixed Again] Kindle Bookstore Search


Recommended Posts

Hello, fellow workers of flow! These workflows search the U.S. and UK Kindle Bookstores. The latest version of the script uses Amazon's search API rather than relying on scraping a search page. Additionally, book covers are locally cached and HTTP requests are locally cached, which should dramatically increase its speed. Both covers and prices are now (usually) displayed in the U.S. store, though the UK store does not support price listings. You can download them both through AlfPT or at the following links:
Kindle Bookstore US
Kindle Bookstore UK

Screen%20Shot.png

Link to comment

Thanks, this is really useful. I was wondering (cheekily) if there was any way to use Kobo as the source, as that's the ereader I own. I know very little about Python, and wouldn't know where to begin to change things. Is there a simple way to do it, or am I being far too ambitious? Thanks so much, I really appreciate your work :)

Link to comment
Thanks, this is really useful. I was wondering (cheekily) if there was any way to use Kobo as the source, as that's the ereader I own. I know very little about Python, and wouldn't know where to begin to change things. Is there a simple way to do it, or am I being far too ambitious? Thanks so much, I really appreciate your work :)

 

Thanks! It's not quite as simple as pointing the script at a different URI, since it needs to search the page for specific tags that contain the data it needs; however, it's also not quite a matter of totally rewriting it, either, and the Kobo search page is pretty clearly laid-out, so I'll see if I can't put something together later this afternoon.

Link to comment

Thank you so much! I really appreciate it. I am currently looking for books on Python so I can start to make some workflows myself. Might be a while until I master it though!

Cheers.

 

Alright, here you go:

 

kobo.png

 

The workflow is in AlfPT and can also be downloaded here. Let me know if you run into any problems!

 

ETA: Python is pretty well and heavily documented, and well-supported on StackExchange and in various other forums. You might want to hack around with it a bit and see what you can do before buying a whole book. What's more, I don't know that it's that popular among people writing Alfred scripts; I'm just more comfortable with it than with PHP. So your mileage may et cetera.

Link to comment
THANK YOU! It's perfect :)

 

Prices and everything!

 

Cheers.

 

My pleasure! I accidentally left the debug log command in there, so you may want to download it again from that link or update it through AlfPT so that it stops logging all its output. Not sure whether that'd slow it down at all, but better safe than sorry. No differences between the two versions otherwise.

Link to comment
  • 4 months later...

I'm getting nothing at all from the US Kindle search. It just moves on to the fallbacks. I didn't see anything of note in the Console and I'm using the latest version available at the top of this post. I'm using Python 2.7.2 if that makes a difference. Any ideas why it's failing?

Link to comment

I saw something of a response and then it returned with no results, the second time I tried (results in the feedback.log) nothing showed up and it went to the fallback search engines.

 

Also, there was an error in the console.log. I'll try my hand at debugging it a bit further tomorrow to see if I can find the problem as well.

<items>
    <item arg="http://www.amazon.com/The-Last-Threshold-Neverwinter-ebook/dp/B00A1M5EH6%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00A1M5EH6" uid="B00A1M5EH6">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/5161L4VFLaL._SL75_.jpg</icon>
        <subtitle>R. A. Salvatore—Price Missing</subtitle>
        <title>The Last Threshold: Neverwinter Saga, Book IV</title>
    </item>
    <item arg="http://www.amazon.com/The-Companions-Sundering-Book-ebook/dp/B00BE24W0W%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00BE24W0W" uid="B00BE24W0W">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/515jwovI15L._SL75_.jpg</icon>
        <subtitle>R. A. Salvatore—Price Missing</subtitle>
        <title>The Companions: The Sundering, Book I</title>
    </item>
    <item arg="http://www.amazon.com/Charons-Claw-Neverwinter-Saga-ebook/dp/B0078XCSRA%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB0078XCSRA" uid="B0078XCSRA">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51pTm3N%2BnBL._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—Price Missing</subtitle>
        <title>Charon's Claw: Neverwinter Saga, Book III</title>
    </item>
    <item arg="http://www.amazon.com/Gauntlgrym-Neverwinter-Odyssey-Cycle-ebook/dp/B003WUYOTI%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003WUYOTI" uid="B003WUYOTI">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51CAqjsQOAL._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—$7.99</subtitle>
        <title>Gauntlgrym: Neverwinter Saga, Book I (Odyssey Cycle)</title>
    </item>
    <item arg="http://www.amazon.com/Neverwinter-The-Saga-Book-ebook/dp/B004Y1Q762%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004Y1Q762" uid="B004Y1Q762">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51As%2BAIBVDL._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—$27.95</subtitle>
        <title>Neverwinter: The Neverwinter Saga, Book II</title>
    </item>
    <item arg="http://www.amazon.com/Homeland-Legend-Drizzt-Book-ebook/dp/B002DOSBMK%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB002DOSBMK" uid="B002DOSBMK">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51LlcrT926L._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—$7.99</subtitle>
        <title>Homeland: The Legend of Drizzt, Book I: Bk. 1</title>
    </item>
    <item arg="http://www.amazon.com/Weight-Blood-Half-Orcs-Book-ebook/dp/B0036R4JU6%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB0036R4JU6" uid="B0036R4JU6">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51SugQW3KvL._SL75_.jpg</icon>
        <subtitle>David Dalglish—$0.99</subtitle>
        <title>The Weight of Blood (The Half-Orcs, Book 1)</title>
    </item>
    <item arg="http://www.amazon.com/The-Orc-King-Transitions-ebook/dp/B0013TTKUI%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB0013TTKUI" uid="B0013TTKUI">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51%2BriQVpCFL._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—$7.99</subtitle>
        <title>The Orc King: Transitions, Book I</title>
    </item>
    <item arg="http://www.amazon.com/Dungeons-Dragons-Drizzt-Neverwinter-ebook/dp/B009CI6TLA%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB009CI6TLA" uid="B009CI6TLA">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/51PPyhG20hL._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—Price Missing</subtitle>
        <title>Dungeons & Dragons: Drizzt - Neverwinter Tales</title>
    </item>
    <item arg="http://www.amazon.com/Passage-Dawn-Legend-Drizzt-ebook/dp/B002DO17LM%3FSubscriptionId%3DAKIAIJ2QMIHPYL6UNHTA%26tag%3Ddanishan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB002DO17LM" uid="B002DO17LM">
        <icon>/Users/wes/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.danielsh.alfred.kindlestore/covercache/511GIeqvAoL._SL75_.jpg</icon>
        <subtitle>R.A. Salvatore—$7.99</subtitle>
        <title>Passage to Dawn: The Legend of Drizzt, Book X</title>
    </item>
</items>
Edited by wesbaker
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...