Skip to content

Books API not working? Scraper getting 403 Forbidden #4

Description

@mattj256

Hi. Thanks for creating this project!

I'm trying to execute the sample code from the README.

##!/usr/bin/python3

from storygraph_api import Book

id = "e5a59ed0-31f0-46af-849e-cd8e624b68ff"
book = Book()
result = book.book_info(id)
print(result)

The final Python error message:

"{\n "error": "Parsing Error: 'NoneType' object has no attribute 'contents'"\n}"

This isn't very useful so I debugged with my IDE:

Image

Looks like BookScraper is getting 403 Forbidden from TheStoryGraph.

I see the same 403 error from curl.
(Note: the README has book ID fbdd6b7c-f512-47f2-aa94-d8bf0d5f5175, which gives the same error.)

$ curl -o - -I https://app.thestorygraph.com/books/e5a59ed0-31f0-46af-849e-cd8e624b68ff
HTTP/2 403 
// ...

It looks like the request is getting rejected by CloudFlare, before it gets to TheStoryGraph.

Am I doing something wrong here? Is this something that worked a few months ago, and now it doesn't work? Any help/advice would be appreciated. Thanks.

No activity

Activity on this issue will appear here.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions