Goodreads Developers discussion

examples / showcase > python ElementTree cannot extract shelves

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

message 1: by Shane (new)

Shane Phillips | 24 comments I am using python and "ElementTree" to extract the Goodreads API. However, I cannot find out how to get the list of shelves that I have a book on from the XML.
note: added a space so goodreads would not process xml.
-------sample----------
< spoilers_state>none
< shelves>
< shelf exclusive="false" id="153934772" name="full-list" review_shelf_id="2562838816" sortable="true"/>
< shelf exclusive="true" id="269364260" name="s-harry_bosch" review_shelf_id="2562838881" sortable="true"/>
< /shelves>
< recommended_for/>
---------end sample

I am not sure how to get the shelf name and shelf_id out of these tags.

any help extracting the < shelves> portion?

API method:
https://www.goodreads.com/review/list...

thanks

reply | edit | delete | flag *


back to top