Skip to content

Commit 63ad953

Browse files
committed
Fix reddit example. Close lepture#249
1 parent fa7d9d6 commit 63ad953

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

example/reddit.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,16 @@ def login():
9090
def reddit_authorized():
9191
resp = reddit.authorized_response()
9292
if isinstance(resp, OAuthException):
93-
print resp.data
93+
print(resp.data)
9494

9595
if resp is None:
9696
return 'Access denied: error=%s' % request.args['error'],
97-
print resp
9897
session['reddit_oauth_token'] = (resp['access_token'], '')
9998

10099
# This request may fail(429 Too Many Requests)
101100
# If you plan to use API heavily(and not just for auth),
102101
# it may be better to use PRAW: https://github.com/praw-dev/praw
103102
me = reddit.get('me')
104-
print me.data
105103
return 'Logged in as name=%s link_karma=%s comment_karma=%s' % \
106104
(me.data['name'], me.data['link_karma'], me.data['comment_karma'])
107105

0 commit comments

Comments
 (0)