Guest User

Untitled

a guest
Oct 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from weibo import APIClient
  4.  
  5. import urllib2
  6. import urllib
  7. import sys
  8. import time
  9. from time import clock
  10. import csv
  11. import random
  12.  
  13. reload(sys)
  14. sys.setdefaultencoding('utf-8')
  15.  
  16. '''Step 0 Login with OAuth2.0'''
  17. if __name__ == "__main__":
  18. APP_KEY = '294703483' # app key
  19. APP_SECRET = 'a2ef9de0a580edb7a26daf2804d27624' # app secret
  20. CALLBACK_URL = 'https://api.weibo.com/oauth2/authorize' # set callback url exactly like thi
  21.  
  22. client = APIClient(app_key=APP_KEY, app_secret=APP_SECRET, redirect_uri=CALLBACK_URL)
  23. referer_url = client.get_authorize_url()
  24.  
  25. r = client.statuses.user_timeline.get(uid=SOME_ID)
  26. for st in r.statuses:
  27. print st.text
  28.  
  29. r = client.statuses.user_timeline.get(uid=SOME_ID)
  30. ^
  31. IndentationError: unindent does not match any outer indentation level
Add Comment
Please, Sign In to add comment