Skip to content

isbnlib always returns HTTP 429 when accessing Google Books[BUG] #150

Description

@seanboyce

Describe the bug
I am receiving HTTP 429 errors when requesting book metadata via Google Books. This happens 100% of the time, and regardless of request frequency (I make one request every few minutes at maximum). Other data sources (wiki, openl) are working fine.

To Reproduce

I have isbnlib==3.10.14 and Python 3.10.12

My test script follows. It returns a HTTP 429 error for google books, other services work normally:

from isbnlib import *
isbn ='9786586691627'
book = {}
try:
    book = meta(isbn,service='goob')
    print(book)
except Exception as e:
    print("Google Books API failed with response: " )
    print(e)
try:
    if len(book)==0:
        book = meta(isbn,service="openl")
except Exception as e:
    print("Open Library API failed with response: " )
    print(e)
try:
    if len(book)==0:
        book = meta(isbn,service='wiki')
except Exception as e:
    print("Wikipedia API failed with response: " )
    print(e)
if len(book)==0:
    raise LookupError(f"Book with isbn {isbn} not found!")
#else:
#    print(book)

Additional context
I am located in Viet Nam. I've tried running from both a residential IP address and my VPS. I've never encountered a geoblocking issue with google books before, but I can't rule it out either. Let me know if any other information I can provide.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions