Amazon bookmarklet

CharlasHacking LibraryThing

Únete a LibraryThing para publicar.

Amazon bookmarklet

Este tema está marcado actualmente como "inactivo"—el último mensaje es de hace más de 90 días. Puedes reactivarlo escribiendo una respuesta.

1legallypuzzled
Ene 21, 2012, 1:15 pm

There were some complaints in 2009 that the official LT Amazon bookmarklet no longer worked.

I've made a few modifications and it seems to be working. I've posted the new code on my web site.

Unfortunately, the LT API does not expose Collections, which basically means that if you are not using any of the pre-defined collections, you'll have to do some investigative work to modify the bookmarklet to send Amazon books to your collection. I'm not sure that there's an "easy" way to find the magic number of your collection (it's not the order that you have them), but one way is to view your library ("Your books" tab) and change to the collection you want to know about. Hover over the collection button and you should see a URL that ends with "viewstyle=" -- that number after the equals sign is the collection number. Add the bookmarklet and where it says "dc=1" (Your Library) or "dc=4" (Wishlist) change that number to the number of your collection. Be aware that if you delete the collection, this bookmarklet is not smart enough to reprogram itself!

I don't really use the bookmarklet at all, so if it stops working, please post a message here and I'll see if it's fixable.

2rsterling
Ene 21, 2012, 1:28 pm

I added this to my bookmarks, then tried to use it on a book on Amazon. But I keep getting a light box that says: "Use this on an Amazon book page."

I tried it with both the library and the wishlist bookmarklet.

3rsterling
Ene 21, 2012, 1:29 pm

Here's the URL for the book I was trying to add:
http://www.amazon.com/gp/product/0521669499?ie=UTF8&tag=craetive-20&link...

4legallypuzzled
Ene 21, 2012, 1:34 pm

Well, that's odd, because it's working for me. I know it won't work on non-ISBN'd books, though. Let me check a few things....

5legallypuzzled
Ene 21, 2012, 2:02 pm

Ah. I see what you're seeing. I think I've fixed that. Please delete and "reinstall" the bookmarklets from the web page and see if those now work for you. (You may have to SHIFT-F5/reload the page to ensure you're not using your cached version.)

6rsterling
Ene 21, 2012, 3:10 pm

Works now - thanks!

7legallypuzzled
Ene 21, 2012, 3:21 pm

Great news. Thanks for helping me test this out!

8seasaltresearch
Ene 6, 2013, 7:12 am

hi there, for some reason when i searched lT no evidence of this post. also i popped jeremy a question aandnot mention ofyour hack. i found u thru google... like page 15... of search results.

perhaps you can get a link on the "tools" there is someone who has updated it. or at least post in the wikithing for LT.

---
thanks for doing the hard yards. about to test.

9seasaltresearch
Ene 6, 2013, 7:19 am

all worked -- exiquisitely -- THANKYOU
even with the Kindle ASIN. something not possible by the manual add. woo hoo!
---
questions:
Does the bookmarklet take the kindle cover or the paperback cover?
> i ask as ive added manually and could not geet the kindle cover automatically
--
What field is the ASIN stored in?
> I ask as when i did a test export, i could not see the ASIN. only ISBN.
---
Does the bookmarklet take the original publisher date from hardback or the relaunch kindle date?
> I ask as when i exported, I could not see the original publisher date in csv

---
thankyou

10adriennef
Ene 6, 2013, 8:07 am

Ohhhh... Thanks!

11legallypuzzled
Ene 6, 2013, 11:26 am

Does the bookmarklet take the kindle cover or the paperback cover?

The bookmarklet just takes the ISBN/ASIN from the Amazon page and dumps it into the "Add Books" routine. LibraryThing can only access covers with an ISBN link, which suggests most of the Kindle covers will not appear unless you manually change them.

What field is the ASIN stored in?

I don't believe the ASIN is saved, unless it is a valid ISBN.

Does the bookmarklet take the original publisher date from hardback or the relaunch kindle date?

Again, the bookmarklet only sends the ISBN, which will usually match the hardback/paperback copy and not the Kindle copy.

Glad it's still working and useful to people!

12rsterling
Ene 6, 2013, 7:17 pm

When searching for posts you need to select "Talk" to search the Talk section:
http://www.librarything.com/search.php?search=amazon+bookmarklet&searchtype=...

13seasaltresearch
Ene 6, 2013, 11:57 pm

thankyou!

14seasaltresearch
Ene 7, 2013, 12:01 am

hi:
i am thinking i would like to alter the "hack librarything" so it stores
- ASIN in a field
- grabs the synposis from amazon page
- grabs the equivalent paperback ISBN

as what ir ealised after about 10... was that now i really have messed up the Library Thing catalogue. as the import did not have the isbn a new record is created, so that means
- no cover
- no link to see who else has it
- duplicate book record
- and in some cases a duplicate author

mmm....

1) so i sensed the above mustnt be easy, as you would of done it.
correct?

2) do we have ability to modify what we grab from amazon or restricted to library thing add books? (is there a doco explaining what can/cannot be grabbed)

I would like to get it right before i bring in my 3000 odd books.... (they are all in wishlists in amazon currently. Kindle if a kindle exists, and paperback if they not yet kindalised)

thankyou in advance for your help

15legallypuzzled
Ene 7, 2013, 6:38 am

* LibraryThing is, rather simplistically, a giant database of books. The fields it allows us to fill in are set, and cannot be increased without the site administrator (Tim) doing additional work. There have been dozens of ideas proposed, and a few have been added (book dimensions, Lexile scores).

* Since this is a book cataloging site, any proposal to combine the records of an ASIN and an "equivalent" ISBN are likely to fail. Many of us want the exact book information in our data. The print data -- significantly, page numbers and "book dimensions" -- will not be correct for an electronic book.

* You have not "messed up" the LibraryThing catalog. You have created an additional "work" record which can be combined with other editions of the book. It is strongly recommended to ask the Combiners! group to assist, as it is far too easy to combine two unrelated works and really mess things up! By combining (correct) records, it ensures that any future person adding the book with the "duplicate" author/title name will automatically be combined with the correct work.

Please also note that if you plan on importing more than 200 books, you will need to have a paid account, as the free account only allows a limited number of books.

16rsterling
Editado: Ene 7, 2013, 10:51 am

"i am thinking i would like to alter the "hack librarything" so it stores
- ASIN in a field
- grabs the synposis from amazon page
- grabs the equivalent paperback ISBN"

I think you mean the "bookmarklet"? ("Hack librarything" is the general name of this group, which discusses several different hacks, not just the bookmarklet.)

All the bookmarklet does it provide a shortcut to start the routine of adding a book in LT. It takes the ISBN or ASIN from the page you're looking at on Amazon, and inserts it into the "search" routine on the Add Books page on LibraryThing. It's the "Add Books" process that then grabs data from whatever source you've specified as your default, which might be Amazon or a library source (your choice). What the bookmarklet does is more or less the equivalent of copy, paste, hit enter. It's the LT Add Books process (and your chosen source) that determines what data is pulled.

Some things to know about the LT Add Books process:
(see also here: http://www.librarything.com/wiki/index.php/Adding_and_importing_books)
1) There is no field for ASIN in LT, and LT will not import this information.
2) The Add Books process doesn't and can't pull the synopsis from Amazon directly into your catalog. However, for many books, you'll see that Amazon *does* pull a synopsis into the work page (which is general LT data, not specific to anyone's catalog). See the bottom of https://www.librarything.com/work/9209435. I'm not sure what prompts the work to get the Amazon description, or how often these are updated, but I'm pretty sure the process is tied to ISBN.
3) The Add Books process will usually grab an ISBN as part of the add books process, for physical books, if there is an ISBN in the source record (on Amazon or the library source); it may or may not grab the one for the paperback book. However, if you're adding e-books/Kindle books from Amazon (and adding using ASINs for Kindle books), Amazon doesn't include ISBNs for Kindle books. So that's a problem with the data Amazon provides, not with LT. LT looks for an ISBN in the record, but there isn't one there. So, you are unlikely to get anything in the ISBN field for Kindle books you add (because Amazon doesn't assign ISBNs to Kindle books). You'd have to manually edit your records in LT afterwards if you want something in the ISBN field.

On covers: LT doesn't import covers per se, but if the LT record has an ISBN and there's a cover on Amazon that matches that ISBN, LT uses that cover.

If you're trying to add 3000 plus books, and many or most of those are physical books, I wouldn't necessarily recommend using the bookmarklet as your main method of adding.

It's going to be a bit complicated if you have a mix of ebooks and physical books, but here's what I recommend:
1) for your physical books: follow the procedures for importing from Amazon, detailed here:
http://www.librarything.com/wiki/index.php/Adding_and_importing_books#How_do_I_i...
This means copying and pasting the source code (see instructions) for your order history and/or wishlist (you could also use "books I own" on Amazon). What this will do is make LT scan that source code looking for ISBNs; LT will then use those ISBNs as search terms in the Add Books process, and will grab data from the data sources you specify (you can choose three, and prioritize them). Some caveats: (a) This will only import data for physical books, not ebooks (unless by some chance the ebook has an ISBN listed in Amazon or whatever source you use, which would be unusual). The process will skip any books that don't have ISBNs. (b) You will need to compare the results of the import to the lists on your wishlist and/or order history, to make sure all the physical books' records did import (and that it imported the right data/versions/etc.). Sometimes LT searches on an ISBN but gets no results.
2) for your ebooks: you'll have to do these individually, and here the bookmarklet might be useful. You'll have to identify which of your books are ebooks, and then individually either use the bookmarklet or enter the ASIN into LT's Add Books page (using Amazon as the source).

If you encounter difficulties with or have questions about adding books or importing, the best places to ask questions are here:
http://www.librarything.com/groups/faq
http://www.librarything.com/groups/welcometolibrarythin

17seasaltresearch
Ene 7, 2013, 6:20 pm

thankyou legallypubzzled.

----
* Nice tip re; combiners. Will let them know, all the additional work records ive created. bad me.
* Ive evaluating LT at moment before i pay. if i cannot get LT to work for me, then i have to say bye bye. sad and stay an island with my belovedbooks
* Once i have the ebooks, ive been giving my physical book to my local library/friend. except for a tiny subset of the most dearest to me. So ive really embraced ebook land.
---
all my books 3000+ are in amazon wish list. correct covers. correct meta data.
sorted, ready for import
that is why i wish to use the bookmarklet.
---
during import, using bookmarklet, i had planned to
>categorise by collection (typically I use collections as a bibliography)
> for about 3/4 of my books, as have been kindalised already, so i had wanted to bring in the kindle page (not the physical book page, so when I get hte kindle i dont need redo my catalog. these will have a tag)
> for these 3/4, add info of physical book (+ add ISBN, orig pub date, orig book size, orig page numbers).
> the other 1/4 are in a wishlist (not yet kindle-ized) and so ive made the amazon request. plus i submit this list to ereaderiq (who notifies me when kindalised)
---

so based on ur reply, sounds like LT is meant for non-ebooks :-(

THANKYOU so much for your help. much appreciated

18seasaltresearch
Ene 7, 2013, 6:22 pm

many thanks for your thoughtful reply, rsterling
>my 3000+ are about 3/4 kindle.
>but i want to bring ALL in as kindle, so i dont need to redo the other 1/4 when eventually book is kindalised. and i get the kindle.

19knotbox
Abr 2, 2014, 10:33 am

Just wanted to thank you, LegallyPuzzled, the new (2009) bookmarklet is working for me! Tags aren't coming in, but that is a minor thing for me. :) Saves me a lot of time adding ebooks!

20Ellen-Key-Schule
Abr 26, 2019, 7:50 am

Thank you for the widget, it still works great!

One Question: Is there any chance one can make it work for people who are not logged in to the LT Backend (i.e. TinyCat Patrons)? For example by storing the login info inside the javascript? Well I guess that is rather unsafe ...