mirror of
https://github.com/blusunny/qinglong.git
synced 2025-12-17 15:24:51 +08:00
Update 天行语录.py
This commit is contained in:
9
天行语录.py
9
天行语录.py
@@ -1,14 +1,15 @@
|
|||||||
# 原作者@author Sten
|
# 原作者@author Sten
|
||||||
# 原作者仓库:https://github.com/aefa6/QinglongScript.git
|
# 原作者仓库:https://github.com/aefa6/QinglongScript.git
|
||||||
# 原代码运行输出不成功,在“文心一言”的帮助下成功输出了内容,哈哈(20231105)
|
# 原代码运行输出不成功,在“文心一言”的帮助下成功输出了内容,哈哈(20231105),在“文心一言”的帮助下成功改写定义环境变量的方式(20231128)
|
||||||
# 自行修改11、25、26三行,其中11行的api必填.
|
|
||||||
# 需要在天行提前注册获取api(https://www.tianapi.com/console/,数据管理-我的密钥key)并申请相应接口才能使用,https://www.tianapi.com/list/
|
# 需要在天行提前注册获取api(https://www.tianapi.com/console/,数据管理-我的密钥key)并申请相应接口才能使用,https://www.tianapi.com/list/
|
||||||
|
# export TianXingAPIKey='您的密钥' 自行在青龙中添加环境变量
|
||||||
|
|
||||||
|
import os
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
import notify
|
import notify
|
||||||
|
|
||||||
api = "天行API密钥" # 这里填写你在天行API注册的密钥
|
api = os.environ.get('TianXingAPIKey') # 从环境变量中获取天行 API 密钥
|
||||||
|
|
||||||
pyurl = f'https://apis.tianapi.com/pyqwenan/index?key={api}' #朋友圈文案
|
pyurl = f'https://apis.tianapi.com/pyqwenan/index?key={api}' #朋友圈文案
|
||||||
caurl = f'https://apis.tianapi.com/caihongpi/index?key={api}' #彩虹屁
|
caurl = f'https://apis.tianapi.com/caihongpi/index?key={api}' #彩虹屁
|
||||||
@@ -22,7 +23,7 @@ zhurl = f'https://apis.tianapi.com/zhanan/index?key={api}' #渣男语录
|
|||||||
waurl = f'https://apis.tianapi.com/wanan/index?key={api}' #晚安心语
|
waurl = f'https://apis.tianapi.com/wanan/index?key={api}' #晚安心语
|
||||||
duurl = f'https://apis.tianapi.com/dujitang/index?key={api}' #毒鸡汤
|
duurl = f'https://apis.tianapi.com/dujitang/index?key={api}' #毒鸡汤
|
||||||
|
|
||||||
urls = [pyurl, caurl, tiurl, mrurl, zaurl, lrurl, saurl] # 按照格式填写你要推送的内容对应的url,默认是朋友圈文案、舔狗日志和毒鸡汤
|
urls = [pyurl, caurl, tiurl, mrurl, zaurl, lrurl, saurl] # 按照格式填写你要推送的内容对应的url,默认是前面的几种
|
||||||
count = 2 # 相同类型推文的数量,默认是两条
|
count = 2 # 相同类型推文的数量,默认是两条
|
||||||
|
|
||||||
contents = ""
|
contents = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user