I don't want to check if a ISBN is valid.
I'm trying to figure out if, given a ISBN isbn, there's already a book associated with it.
What I already tried
I was planning to use the following function:
import requests
def is_isbn_already_used(isbn:str)->bool:
""" Given a ISBN string, returns True if there's a
book already associated with it"""
# Tries to search ISBN in the below site
response = requests.get("https://isbnsearch.org/isbn/" + isbn)
# checks if the site doesn't have any info about that isbn
return not ("Not Found" in response.text)
The problem is: The part where the function gets the text of the page doesn't works as I expected. Probably, because the site is dynamic, it waits a few ms before showing the info about the book.
I was thinking of dealing with Selenium's Webdriver for Firefox, but then I would need to deal with the captcha.
Any idea would be appreciated.