Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book General > General Discussions

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 07:01 AM   #1
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 211
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
Question Online book database?

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.
Shohreh is offline   Reply With Quote
Old Yesterday, 07:34 AM   #2
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,423
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.
Quoth is offline   Reply With Quote
Advert
Old Yesterday, 09:03 AM   #3
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
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
Shohreh is offline   Reply With Quote
Old Yesterday, 09:21 AM   #4
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 74,113
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.
pdurrant is offline   Reply With Quote
Old Yesterday, 09:44 AM   #5
salamanderjuice
Guru
salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.
 
Posts: 944
Karma: 13014268
Join Date: Jul 2017
Device: Boox Nova 2
There are ISBN databases. ISBNdb.com, ISBNsearch.org.
salamanderjuice is offline   Reply With Quote
Advert
Old Yesterday, 10:46 AM   #6
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
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.
maddz is offline   Reply With Quote
Old Yesterday, 01:00 PM   #7
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<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.
Shohreh is offline   Reply With Quote
Old Yesterday, 01:51 PM   #8
salamanderjuice
Guru
salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.salamanderjuice ought to be getting tired of karma fortunes by now.
 
Posts: 944
Karma: 13014268
Join Date: Jul 2017
Device: Boox Nova 2
Quote:
Originally Posted by Shohreh View Post
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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<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)
isbndb.com has an API, you get a request a second for free. Probably better for your use case.
salamanderjuice is offline   Reply With Quote
Old Yesterday, 02:53 PM   #9
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
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("==============")
Shohreh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:41 PM.


MobileRead.com is a privately owned, operated and funded community.