Skip to content

Updated indexer for book url#4

Open
achantz wants to merge 1 commit intobootdotdev:mainfrom
achantz:main
Open

Updated indexer for book url#4
achantz wants to merge 1 commit intobootdotdev:mainfrom
achantz:main

Conversation

@achantz
Copy link
Copy Markdown

@achantz achantz commented Mar 9, 2026

Updated array indexer to include charset=utf-8 in JSON output. This was returning an empty string and would skip the fetching of the book text, since it could not determine the actual book url.

Sample JSON output from page fetch

"formats": {
        "text/html": "https://www.gutenberg.org/ebooks/768.html.images",
        "application/epub+zip": "https://www.gutenberg.org/ebooks/768.epub3.images",
        "application/x-mobipocket-ebook": "https://www.gutenberg.org/ebooks/768.kf8.images",
        "application/rdf+xml": "https://www.gutenberg.org/ebooks/768.rdf",
        "image/jpeg": "https://www.gutenberg.org/cache/epub/768/pg768.cover.medium.jpg",
        "application/octet-stream": "https://www.gutenberg.org/cache/epub/768/pg768-h.zip",
        HERE --> "text/plain; charset=utf-8": "https://www.gutenberg.org/ebooks/768.txt.utf-8"
      },

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

Successfully merging this pull request may close these issues.

1 participant