Skip to content

A Python library to access Weibo's private write API.

Notifications You must be signed in to change notification settings

wdwind/weibo_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weibo Write API

A Python wrapper for Weibo write API.

Python 3.7

Note (2020.12)

Weibo(.com/.cn) recently had an update that added more restrictions to the login logic. Basically if a device is not trusted (like a new device), multi-factor authentication is always required during login. The library now supports secondary verification via sms or private message.

Although secondary verification is supported, there are some non-negligible limitations. For example, the process cannot be fully automated (need human intervention), and certain authentication method (especially sms) can only be used a few times per day.

As a result, it is highly recommended to save the requests session to avoid re-login every time when using the api. Check examples/ on how to save/load the session to a file.

Features

  • Login with private message or sms
  • Post text
  • Post image
  • Post video
  • Repost

Install

  • Install with pip:

    pip install git+https://git@github.com/wdwind/weibo_api.git
    
  • To update:

    pip install git+https://git@github.com/wdwind/weibo_api.git --upgrade
    
  • To update with latest repo code:

    pip install git+https://git@github.com/wdwind/weibo_api.git --upgrade --force-reinstall
    

Examples

Check examples/.

Development

  • Run unit tests
    python -m unittest discover
    

License

MIT

Disclaimer

Weibo services are highly unstable. Use it at your own risk.

About

A Python library to access Weibo's private write API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages