Skip to content

Commit 9aea913

Browse files
committed
[fix] 修复pushUrl未配置相关Secrets报错
之前的修复版本未考虑充分,这次从yml中进行空值判断
1 parent 21f92b5 commit 9aea913

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pushUrl.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
def parse_stiemap(site):
1717
site = f'{site}/sitemap.xml'
18-
print('解析站点地图中,请稍后……')
1918
try:
2019
result = requests.get(site)
2120
big = re.findall('<loc>(.*?)</loc>', result.content.decode('utf-8'), re.S)
@@ -86,9 +85,11 @@ def push_to_baidu(site, urls, token):
8685
urls = random.sample(urls, QUOTA)
8786
# 推送bing
8887
if args.bing_api_key:
88+
print('正在推送至必应,请稍后……')
8989
push_to_bing(args.url, urls, args.bing_api_key)
9090
# 推送百度
9191
if args.baidu_token:
92+
print('正在推送至百度,请稍后……')
9293
push_to_baidu(args.url, urls, args.baidu_token)
9394
else:
9495
print('请前往 Github Action Secrets 配置 URL')

0 commit comments

Comments
 (0)