您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Python3实现的腾讯微博自动发帖小工具

2025/5/8 17:54:05发布23次查看
代码如下:
# -*- 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()
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product