Python3实现的腾讯微博自动发帖小工具
代码如下:
# -*- coding: UTF-8 -*- import mysql.connector as db import client.tWeibo import time if __name__ == '__main__': connect = db.connect(user='root',db='collection',password='',host="127.0.0.1") cursor = connect.cursor() cursor.execute("SET SQL_MODE = 'TRADITIONAL'") uin = 'QQ号' passwd = '密码' wb = client.tWeibo.tWeibo(uin, passwd) wb.login() sqlSelectTwitter = "SELECT `content`,`pic` FROM `collection`.`weibo_content2` ORDER BY `id` DESC LIMIT 0, 144" cursor.execute(sqlSelectTwitter) for (content, pic) in cursor: result = wb.publish(content, pic) print(result) print("暂停10分钟......") time.sleep(600) cursor.close() connect.close()
相关推荐
Justdoit00 2020-04-26
dreamhua 2020-01-31
nicepainkiller 2020-01-06
JackLang 2019-12-19
zhangchaoming 2019-12-18
pythonxuexi 2019-12-16
暗夜之城 2019-11-13
bigdatazx 2010-11-05
qsdnet我想学编程 2019-11-04
DAV数据库 2019-10-26
圆圆的世界CSDN 2019-10-22
nickey 2011-11-17
ebuild 2017-02-14
zhaoshuliok 2012-09-12
人勤阡陌绿 2019-03-27
nosqlnotes 2014-08-16