Optimization code

This commit is contained in:
NianBroken committed 2024-07-25 19:36:29 +08:00 Unverified
1 parent 9d4b723035
commit 6f499dc544
4 files changed
+23 -1

No files matched your search

View File
Whitespace-only changes.
+4 -1
View File
@@ -150,6 +150,8 @@ workflow_info = (
f"Beijing Time:{beijing_time}" f"Beijing Time:{beijing_time}"
) )
copyright = "Copyright © 2024 NianBroken. All rights reserved."
# 第一次运行时的提示文本 # 第一次运行时的提示文本
first_run_text = ( first_run_text = (
"你的程序运行成功\n" "你的程序运行成功\n"
@@ -165,7 +167,8 @@ integrated_send_info = (
f"{integrated_info}\n" f"{integrated_info}\n"
f"{integrated_grade_info}\n" f"{integrated_grade_info}\n"
f"{selected_courses_filtering}\n" f"{selected_courses_filtering}\n"
f"{workflow_info if github_actions else current_time}" f"{workflow_info if github_actions else current_time}\n"
f"{copyright}"
) )
# 整合首次运行时需要使用到的所有信息 # 整合首次运行时需要使用到的所有信息
+16
View File
@@ -0,0 +1,16 @@
import requests
def advertise():
ad_content = ""
try:
ad_url = "https://raw.githubusercontent.com/NianBroken/ZFCheckScores/main/data/advertise.txt"
# 发送HTTP GET请求获取内容
response = requests.get(ad_url)
# 检查请求是否成功
if response.status_code == 200:
# 输出内容
ad_content = f"{response.text}\n------"
return ad_content
except Exception:
return ad_content
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more