![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 211
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
|
![]()
Hello,
I need to sell boxes of books that are taking space needlessly at home. I'll first use a barcode scanner to scan each book. Before I write a Python script to then read through the list to grab title + author from Amazon, is there a free online book database I could use? Thank you. |
![]() |
![]() |
![]() |
#2 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,414
Karma: 107078855
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Each edition of same title & author has a different barcode, so Amazon may not be useful. They are certainly not complete either for older books.
|
![]() |
![]() |
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 211
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
|
It did the job when I did this over ten years ago, with very few books missing
|
![]() |
![]() |
![]() |
#4 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74,111
Karma: 315558332
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
If you're more interested in shifting the books quickly than getting the absolute best possible price, there are probably bulk buyers in France as in the UK. They'll provide software to take the ISBN and give a price.
In the UK the one I know about is https://www.webuybooks.co.uk/ They have an app for your mobile that'll use the phone's camera to scan the barcode. |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 944
Karma: 13014268
Join Date: Jul 2017
Device: Boox Nova 2
|
There are ISBN databases. ISBNdb.com, ISBNsearch.org.
|
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,411
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
|
If you're planning to sell them yourself individually, you could take a look at LibraryThing to generate a catalogue. There are booksellers using the site from some of the tags one sees.
|
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 211
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
|
Thanks for the tips. There's a site where I can sell boxes of books for free that I used before. I just need to make a list.
Looks like isbnsearch.org is pretty good. Before I look further, if someone here knows Python and Beautifulsoup, how do I get the author and published date? Code:
""" <div class="bookinfo"> <h1>My Title</h1> <p><strong>ISBN-13:</strong> <a href="/isbn/123">123</a></p> <p><strong>ISBN-10:</strong> <a href="/isbn/456">456</a></p> <p><strong>Author:</strong> My Author</p> <p><strong>Binding:</strong> Paperback</p> <p><strong>Publisher:</strong> My Publisher</p> <p><strong>Published:</strong> 2009</p> <p> <a class="special-link" href="https://bookscouter.com/book/123" target="_blank">Sell this book</a> <a class="special-link" href="https://www.campusbooks.com/search/123?buysellrent=buy&popup" target="_blank">Buy or Rent?</a> </p> </div> """ import requests from bs4 import BeautifulSoup HEADERS = ({'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36', 'Accept-Language': 'en-US, en;q=0.5'}) url = 'https://isbnsearch.org/isbn/123' reqs = requests.get(url, headers=HEADERS) soup = BeautifulSoup(reqs.text, 'lxml') print("Title of the website is : ",soup.head.title.string) div = soup.find("div", attrs={"class": 'bookinfo'}) print(div.h1.string) for p in div("p"): #BAD print(p.string) print(p.text) #OK but I'd rather get the element's string Edit: Not so good… After a while, isbn.org displays a "Please Verify to Continue". I'll go back to trying Amazon. Code:
for div in soup("div", attrs={"class": 'puisg-col-inner'}): book_url = div.find("a", attrs={"class": 'a-link-normal s-line-clamp-2 s-link-style a-text-normal'}) if book_url: print(book_url.string) Last edited by Shohreh; Yesterday at 01:36 PM. |
![]() |
![]() |
![]() |
#8 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 944
Karma: 13014268
Join Date: Jul 2017
Device: Boox Nova 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 211
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
|
Thanks, I'll check it out.
Meanwhile, this seems to work when using Amazon. I just need to ignore suggested books that sometimes show up in a book's details: Code:
import re import requests from bs4 import BeautifulSoup HEADERS = ({'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36', 'Accept-Language': 'en-US, en;q=0.5'}) url = 'https://iww.amazon.com/s?i=stripbooks&rh=p_66%3A123' pattern_url = re.compile("^(.+?)/ref=") #suggested stuff pattern_url_bad = re.compile("^/sspa/click") #title: Ignore stuff after dash pattern_title = re.compile("^(.+?) - ") reqs = requests.get(url, headers=HEADERS) soup = BeautifulSoup(reqs.text, 'lxml') for div in soup("div", attrs={"class": 'puisg-col-inner'}): results = div.find("a", attrs={"class": 'a-link-normal s-line-clamp-2 s-link-style a-text-normal'}) if results: #sponsored stuff? ignore m = pattern_url_bad.search(results["href"]) if m: continue m = pattern_url.search(results["href"]) if m: url = f"https://www.amazon.com/{m.group(1)}" print(url) #TODO Also returns sponsored stuff in book's page sometimes? reqs = requests.get(url, headers=HEADERS) soup = BeautifulSoup(reqs.text, 'lxml') title = soup.head.title.string m = pattern_title.search(title) if m: print("Title:",m.group(1)) div = soup.find("div", attrs={"class": 'a-column a-span4 _follow-the-author-card_style_authorNameColumn__1YFry'}) if div: print("Author:",div.text.strip()) print("==============") |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Every book in my database now appears twice! | couponprof | Library Management | 20 | 11-12-2024 01:31 PM |
Deleting book from database | jmoore914 | Plugins | 10 | 12-30-2018 08:25 AM |
Book Database | djs71a | General Discussions | 4 | 01-21-2012 08:44 PM |
Get metadata from contents of book in database? | arifzaman | Library Management | 2 | 12-14-2011 10:27 AM |
database of book bindings | Nate the great | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 12-05-2009 08:59 PM |