Goodreads Developers discussion
bugs
>
Python code in documentation not working
date
newest »
newest »
I'm using this: https://github.com/MattMulhern/goodreads which uses the same library and also does not work.
The problem is that I do not have access_token or token_secret, because I haven't registered an app. I only pass client key and secret. Using the Goodreads python library, when I want to access reviews of a user I get this error. The code that raises this error is the one posted by Anurag.
I forgot to mention that I finally accessed the user reviews using the Requests and xmltodict libraries:import requests
import xmltodict
resp = requests.get('https://www.goodreads.com/review/list...', params= {'key':Goodreads['key'], 'v': 2, 'id': myuserid})
data_dict = xmltodict.parse(resp.content)['GoodreadsResponse']
reviews_books = [r for r in data_dict['reviews']['review']]
Hope that helps.
Probably too little too late here, but it seems like goodreads has started enforcing that auth requests use https instead of http.Using the following with the rauth library worked for me.
```
goodreads = OAuth1Service(
consumer_key=key,
consumer_secret=secret,
name='goodreads',
request_token_url='https://www.goodreads.com/oauth/reque...',
authorize_url='https://www.goodreads.com/oauth/autho...',
access_token_url='https://www.goodreads.com/oauth/acces...',
base_url='https://www.goodreads.com/'
)
```





Here is my code:
Instead of running smoothly its throwing this error:
Whole error here: https://pastebin.com/xPdzW2aQ
I had googled all the possible reasons, but can't get any solution. I am stuck. Any help will be appreciated.