python3脚本:熊掌号内容推送

2024-12-26 11:12:18

1、python3脚本,我已经写好。贴图出来

python3脚本:熊掌号内容推送

2、下面进行说明:这里使用python第三方库requests.post(),推送;appid和token、type大家自行替换;

python3脚本:熊掌号内容推送

3、filecontents = {'file': open('news_xin.txt', 'rb&垆杪屑丝#39;)} 这行代码,其中‘news_xin.txt’,是你存放要推送的url地方,一行一个。

python3脚本:熊掌号内容推送

4、os.path.getsize('news_xin.txt') 这个是判断“news_xin.txt”,是否为空;不为空我们推送。

python3脚本:熊掌号内容推送

5、测试下:"success_realtime":1,"remain_realtime":11;推送成功,我也只推送了1条;后面11,你是还能推送11条。

python3脚本:熊掌号内容推送
猜你喜欢