Skip to main content

新浪微博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


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.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

weibo_oauth-0.1.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file weibo-oauth-0.1.3.tar.gz.

File metadata

  • Download URL: weibo-oauth-0.1.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for weibo-oauth-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ec0b02b43b3112a7f8783489dfcc500a57cd0985f3a7fcab3f442628c4b42a81
MD5 d8724325bce4d5c80cca6ada219b378a
BLAKE2b-256 a8a9befded6764fdb70bcfecce88d7e926cb4b8726ad0c1380d4721747af21ef

See more details on using hashes here.

File details

Details for the file weibo_oauth-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: weibo_oauth-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for weibo_oauth-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 665264f73c3677fd7caa55d6bb99b110fb99d2d41de5e8dbca78ff7a6a5a5825
MD5 6359461a81c1ab446e9248511603a593
BLAKE2b-256 31638d3ae251bdba22c9adb260d89480276304fb9218c48db418a0c34fb03ad4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page