@
strak47 模拟登陆获取code, header里应该都加些啥进去 某段代码刚才还可以用,现在不行了诶
postdata = {"client_id": APP_KEY,
"redirect_uri": REDIRECT_URL,
"userId": USERID,
"passwd": PASSWD,
"isLoginSina": "0",
"action": "submit",
"response_type": "code",
}
headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0",
"Host": "
api.weibo.com",
"Referer": referer_url
}
req = urllib2.Request(
url = AUTH_URL,
data = urllib.urlencode(postdata),
headers = headers
)