微信喷子

from wxpy import *
import schedule
import time
import requests


def get_text():
    link = 'https://chp.shadiao.app/api.php'
    response = requests.get(link)
    text = response.text
    return text

def job():
'''
group_name:群名
'''
    bot = Bot(cache_path=True)
    my_group = bot.groups().search('group_name')[0]
    my_group.send(get_text())

schedule.every(1).seconds.do(job)

while True:
    schedule.run_pending()
    time.sleep(1)

你可能感兴趣的:(微信喷子)