phyllisstein Posted January 22, 2013 Share Posted January 22, 2013 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 USKindle Bookstore UK drking 1 Link to comment
phyllisstein Posted January 22, 2013 Author Share Posted January 22, 2013 I've updated this link to a new version that shows cover art in search results, and hopefully the AlfPT update will be pushed through as well. Link to comment
bethany7 Posted January 22, 2013 Share Posted January 22, 2013 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
phyllisstein Posted January 22, 2013 Author Share Posted January 22, 2013 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. bethany7 1 Link to comment
bethany7 Posted January 22, 2013 Share Posted January 22, 2013 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. Link to comment
phyllisstein Posted January 22, 2013 Author Share Posted January 22, 2013 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: 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
bethany7 Posted January 22, 2013 Share Posted January 22, 2013 THANK YOU! It's perfect Prices and everything! Cheers. Link to comment
phyllisstein Posted January 22, 2013 Author Share Posted January 22, 2013 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
laurindel Posted January 23, 2013 Share Posted January 23, 2013 Thats great¡¡ Its possible to do the same for itunes and show results in Alfred bar? Link to comment
phyllisstein Posted January 23, 2013 Author Share Posted January 23, 2013 Thats great¡¡ Its possible to do the same for itunes and show results in Alfred bar? Thanks! I can't honestly think of a way to do it, but that doesn't mean it's impossible. More people might see the question if you ask in a separate thread. Link to comment
laurindel Posted January 24, 2013 Share Posted January 24, 2013 Thanks Phyllisstein ¡ Link to comment
gessulat Posted January 24, 2013 Share Posted January 24, 2013 The link for the Kindle Store workflow is not working anymore, can you update it please? Seems really cool Link to comment
phyllisstein Posted January 24, 2013 Author Share Posted January 24, 2013 The link for the Kindle Store workflow is not working anymore, can you update it please? Seems really cool Sorry about that! I must have uploaded a different version. I've changed the link in the original post. Link to comment
gessulat Posted January 24, 2013 Share Posted January 24, 2013 Thank you! It's working great Link to comment
phyllisstein Posted January 27, 2013 Author Share Posted January 27, 2013 The workflow has been updated to use Amazon's search API rather than scrape an HTML search page. It should be faster and more reliable; the only difficulty is that Amazon will throttle API requests at a certain point, so don't all go looking for books at once. Link to comment
ChrisHumphreys Posted January 29, 2013 Share Posted January 29, 2013 Good Evening, Any chance I can change it as im in the UK and it loads US pricing and amazon.com page?? Link to comment
phyllisstein Posted January 29, 2013 Author Share Posted January 29, 2013 Good Evening, Any chance I can change it as im in the UK and it loads US pricing and amazon.com page?? I've added a "Kindle Bookstore UK" workflow to the original post and to AlfPT. Enjoy! Link to comment
phyllisstein Posted February 1, 2013 Author Share Posted February 1, 2013 Just a heads-up that I've updated both the U.S. and UK workflows so that they should no longer quit if multiple keywords are entered. Check for updates on AlfPT or at the links in the original post. Link to comment
npeeps Posted February 1, 2013 Share Posted February 1, 2013 This is really great! Thank you! I'm really enjoying the Kobo one! Link to comment
wesbaker Posted June 12, 2013 Share Posted June 12, 2013 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
phyllisstein Posted June 13, 2013 Author Share Posted June 13, 2013 An overly aggressive length requirement for the query, I suspect. Try the latest version at http://alfred.daniel.sh/Workflows/KindleBookstore.alfredworkflow and if it doesn't work, please check the workflow's folder for a file called feedback.log and post its contents. Link to comment
wesbaker Posted June 13, 2013 Share Posted June 13, 2013 (edited) 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 June 13, 2013 by wesbaker Link to comment
phyllisstein Posted June 15, 2013 Author Share Posted June 15, 2013 Do let me know if you come up with anything; when I plug in "kindle salvatore," I just get that list of results without the fallback switch. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now