新浪微博API封装
Project description
Sina Weibo API
安装
pip install weibo-oauth
使用
from weibo-oauth import Weibo
import webbrowser
#APP_ID,SECRET_KEY,redirect_uri
weibo=Weibo("APP_ID","SECRET_KEY")
#打开浏览器获取request code
webbrowser.open(weibo.get_authorize_url())
#黏贴获取到的code
code=input("input request code:")
#获取access_token
weibo.get_access_token(code)
#请求API,获取所有的评论
_json = weibo.get("comments/by_me")
print(_json)
API请求
weibo.get("comments/by_me",count=200,page=10)
返回一个 json 对象
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
weibo-oauth-0.1.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for weibo_oauth-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d75fcb3c133eda2a4a22f1420d0ab5ff6e16454535072e04f86bc620f6339efc |
|
MD5 | dc043d4faa67e3783c478106590cf1b7 |
|
BLAKE2b-256 | 5ffe4cf736648688c418fcce4b4d6fa1700165f8a712bdf304ce8663598f8d3e |