Goodreads Developers discussion

121 views
questions > book/show API XML response contains escaped HTML characters

Comments Showing 1-2 of 2 (2 new)    post a comment »
dateUp arrow    newest »

message 1: by v (new)

v (avins) I was just checking the given example: https://www.goodreads.com/book/show/5...

then I fetched the same thing using Python Requests. Was surprised to see the response had html characters escaped.

If you want to view, go to above URL in Chrome and check the source.

The API should not returns characters escaped strings.


message 2: by Nichole (last edited Jun 26, 2015 01:48PM) (new)

Nichole Treadway Hi Avi,

Can you point to which field specifically that you're referring to?

We do allow html in text such as reviews, book descriptions, author bios, etc. As this data is often user-generated, we can't guarantee that the data won't include html. We've tried to take care to wrap the data inside xml nodes in CDATA tags so that your parser should understand that the data inside might contain unescaped html tags. For example, the description node in your example contains HTML. If you need html to be stripped out, there's probably a Python library out there that can help you do that.


back to top