Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searches failing for books missing an ASIN #4

Open
majutsushi opened this issue Jul 30, 2024 · 0 comments
Open

Searches failing for books missing an ASIN #4

majutsushi opened this issue Jul 30, 2024 · 0 comments

Comments

@majutsushi
Copy link

Searches seem to be consistently failing for me unless a book has an ASIN identifier.

Here's an example of a book that has a Goodreads ID but neither an ASIN nor an ISBN:

Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0')] 
Failed to download valid cover 
Took 7.015381097793579 seconds 
ASIN not present in metadata
Goodreads id present in metadata: 2.0
Fetching book details: https://www.goodreads.com/book/show/6421982
ISBN not present in metadata
Searching Goodreads for book: https://www.goodreads.com/search?q=A+Game+of+Thrones+George+R.+R.+Martin
Fetching book details: https://www.goodreads.com/book/show/19270939-a-game-of-thrones-by-george-r-r-martin-summary-study-guide?from_search=true&from_srp=true&qid=Y3Bh591lDZ&rank=1
Cover URLs: []

This book has an ISBN but no ASIN:

Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0')] 
Failed to download valid cover 
Took 11.345694303512573 seconds 
ASIN not present in metadata
Goodreads id present in metadata: 18338956
Fetching book details: https://www.goodreads.com/book/show/18338956
ISBN present in metadata: %s 9780374710774
Searching Goodreads for book: https://www.goodreads.com/search?q=9780374710774
Fetching book details: https://www.goodreads.com/book/show/18338956-annihilation
Cover URLs: []

This book does have an ASIN:

Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36')] 
Downloaded cover: 2155x2560 
Took 0.9131753444671631 seconds 
ASIN present in metadata: B08X92NRKV
ASIN present in metadata: B08X92NRKV
Cover URLs: ['https://ec2.images-amazon.com/images/P/B08X92NRKV.01.MAIN._SCRM_.jpg']
Create link to download cover
Downloading 1 covers
Downloaded cover from: https://ec2.images-amazon.com/images/P/B08X92NRKV.01.MAIN._SCRM_.jpg

Based on a cursory look at the code this may be related to the parsing of the editions from the Goodreads page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant