西西软件园多重安全检测下载网站、值得信赖的软件下载站!
西西首页 常用软件 软件下载 安卓软件 游戏下载 安卓游戏 MAC应用 驱动下载 安卓电视
系统工具网络工具媒体工具图形图像聊天工具应用软件编程开发手机软件安卓应用电脑安全字体素材

老婆酱

Python版
  • 老婆酱Python版
  • 软件大小:1KB
  • 更新时间:2021-04-28 13:33
  • 软件语言:中文
  • 软件厂商:
  • 软件类别:国产软件 / 免费软件 / 聊天其它
  • 软件等级:3级
  • 应用平台:WinXP, Win7, win8
  • 官方网站:暂无
好评:50%
坏评:50%

软件介绍

老婆酱(聊天机器人),来自大神编写的一个Python代码,代号“老婆酱”,会称呼你为老公,并且还会以甜蜜的语气向你问好,可以根据需求给她更换不同的头像,小编试了下,还挺萌的,推荐给大家使用。

老婆酱

老婆酱功能简介

AI智能回复助手

有求必应,有问必答

每天必有的早安和晨报功能

老婆酱软件说明

Python代码,需要专业编译器编译后安装到QQ上使用

代码一览

# -*- coding: utf-8 -*-

import requests

 

def post_data(data):

    qmsg_url = 'https://qmsg.zendee.cn/send/key'   #填你的key

    res = requests.post(qmsg_url, data=data).json()

    print(res['reason'])

 

 

def morning():

    url = 'http://api.tianapi.com/txapi/zaoan/index?key=a161e1569f43507da7fe5396f6956fe1'

    res = requests.get(url).json()

    content = res['newslist'][0]['content']

 

    data = {

        'msg': "早上好呀,老公大人@face=2@@face=49@@face=109@\n%s@face=175@" % content

    }

    post_data(data)

 

 

def weather(code):

    url = 'http://t.weather.itboy.net/api/weather/city/%d' % code

    res = requests.get(url, headers=headers).json()

 

    city = res['cityInfo']['city']  # 地区

    forecast = res['data']['forecast']  # 具体天气

    quality = res['data']['quality']

    pm25 = res['data']['pm25']

    pm10 = res['data']['pm10']

    ganmao = res['data']['ganmao']  # ganmao: "各类人群可自由活动"

    shidu = res['data']['shidu']

    wendu = res['data']['wendu'] + '℃'

    for lmaki_data, lmaki in zip(forecast, ['今天', '明天']):

        ymd = lmaki_data['ymd']  # 时间

        week = lmaki_data['week']  # 星期几

        sunrise = lmaki_data['sunrise']  # 日出

        sunset = lmaki_data['sunset']  # 日落

        high = lmaki_data['high']  # 最高温

        low = lmaki_data['low']  # 最低温

        fx = lmaki_data['fx']  # 风向

        fl = lmaki_data['fl']  # 几级风

        type_we = lmaki_data['type']  # 天气

        notice = lmaki_data['notice']  # 提示语

 

        total = f'@face=6@{lmaki}是{week},天气是 {type_we} 哦,温度为{wendu},湿度为{shidu}\npm2.5的值为{pm25},pm1.0的值是{pm10},{ganmao}\n{high},{low},{notice},吹的是{fx},风速达到了{fl}了。\n太阳将在 {sunrise} 升起,{sunset} 落下\n天气质量为 {quality}@face=13@   {ymd}   {city}'

        data = {

            'msg': total

        }

        post_data(data)

 

 

def main():

    morning()

    weather(101210805)    #城市代码

 

 

if __name__ == '__main__':

    headers = {

        'User - Agent': 'Mozilla / 5.0(Windows NT 10.0;WOW64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 86.0.4240.198Safari / 537.36'

    }

    main()

软件标签: 老婆酱 聊天 AI

软件截图

老婆酱 Python版

    其他版本下载

    最新评论查看所有(1)条评论 >

    第 1 楼 北京海淀方正宽带 网友 客人 发表于: 2021/4/28 17:30:30
    话说用这个难道不是越用越难受吗o(╥﹏╥)o

    支持( 0 ) 盖楼(回复)

    发表评论

    昵称:
    表情: 高兴 可 汗 我不要 害羞 好 下下下 送花 屎 亲亲

    下载帮助下载帮助西西破解版软件均来自互联网, 如有侵犯您的版权, 请与我们联系。

    TOP
    软件下载