From 9aea913c3ab49a2d6421d9efb087a0a0c185cb4a Mon Sep 17 00:00:00 2001 From: Ghlerrix Date: Sat, 2 Sep 2023 15:43:54 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8DpushUrl=E6=9C=AA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=9B=B8=E5=85=B3Secrets=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前的修复版本未考虑充分,这次从yml中进行空值判断 --- pushUrl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pushUrl.py b/pushUrl.py index fe5a1bfe..a1ac7844 100644 --- a/pushUrl.py +++ b/pushUrl.py @@ -15,7 +15,6 @@ QUOTA = 100 def parse_stiemap(site): site = f'{site}/sitemap.xml' - print('解析站点地图中,请稍后……') try: result = requests.get(site) big = re.findall('(.*?)', result.content.decode('utf-8'), re.S) @@ -86,9 +85,11 @@ if __name__ == '__main__': urls = random.sample(urls, QUOTA) # 推送bing if args.bing_api_key: + print('正在推送至必应,请稍后……') push_to_bing(args.url, urls, args.bing_api_key) # 推送百度 if args.baidu_token: + print('正在推送至百度,请稍后……') push_to_baidu(args.url, urls, args.baidu_token) else: print('请前往 Github Action Secrets 配置 URL')