• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
带着兔子去拔牙
博客园    首页    新随笔    联系   管理    订阅  订阅

网络编程

用python
post请求
import requests

url = "https://qun.qq.com/cgi-bin/qun_mgr/get_group_list"
data = {"bkn":533159533}
header  = {'cookie':"pgv_pvid=7000160370; fqm_pvqid=4db958ce-a6ba-466e-9116-4c78c6b4f06c; iip=0; tvfe_boss_uuid=99fe6bc527247d7b; o_cookie=1390187782; pac_uid=1_1390187782; uin=o1390187782; skey=@DhIoJAyIW; p_uin=o1390187782; pt4_token=HgxBS8iPgHH*0qxHuG2I*jlZNbqCZa9*Fc8RCGv6*r0_; p_skey=9TWdaGjOE0kpkHcyttmoKibRlrDb*mz0J4NZEdziYwQ_; traceid=559ece82e8"}
ruq = requests.post(url,data ,headers=header)
print(ruq.json())

 机器人发送

url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=f9e52893-296d-42fa-9cef-fa0221551f5f"
today= datetime.datetime.now()
d = {
    "msgtype": "text",
    "text": {
        "content": "现在是%s,大家不要忘记打卡 %today",
        "mentioned_list":["wangqing","@all"],
        "mentioned_mobile_list":["13800001111"]
    }
}
req=requests.post(url,json=d)
print(req.json())

 

posted @ 2022-07-13 18:32  带着兔子去拔牙  阅读(62)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3