Giter Site home page Giter Site logo

weibo's Introduction

weibo

一个自动每天发微博的脚本

要用的话要把APP_KEY,APP_SECRET,CALLBACK_URL,access_token改成自己的

之前大一的时候初学python为了练手写的一个小东西,一直在服务器上跑,没当回事。因为前两天发现博客登不上去才发现服务器宕机了,重启后想重新把这个脚本跑起来还要去源代码里面改执行日期,很是麻烦,于是这次把代码整理了一下添加了一些功能:

1、命令行选项

  -h, --help          show this help message and exit

  -t T, --time=T      -t 设定每天几点发。如 -t 8;默认4点发,24小时制。

  -p, --picture       -p 随机发送图片

  -y, --yingyingying  -y 报时+卖萌

  -r, --random        -r 每天从以上内容中随机选择一种发送

  例如 python SentWeiBo_Console.py -t 19 -p 就是每天19点发送一次图片

2、添加了随机发图片的功能,之前只有报时功能。只要把文件放到和脚本同一目录下的pic文件夹中即可

3、进程守护,这个东西本来是跑在搬瓦工上守护shadowsocket的,手动改一下即可,也在这里做个备份和提醒。有的时候进程会莫名其妙的挂掉

还想要添加的功能:

1、自定义内容,取消原本发送计划,根据参数发送指定内容和图片。发送完之后的下次正常发送

2、自定义发送频率

3、记录发送的内容,包括图片

4、发送邮件通知是否发送成功(失败会有返回码,检测进程可太蠢了)

结果戳到了微博的G点,微博炸号了,嘤嘤嘤

weibo's People

Contributors

786662216 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.