mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
[fix] 修复pushUrl未配置相关Secrets报错
之前的修复版本未考虑充分,这次从yml中进行空值判断
This commit is contained in:
@@ -15,7 +15,6 @@ QUOTA = 100
|
||||
|
||||
def parse_stiemap(site):
|
||||
site = f'{site}/sitemap.xml'
|
||||
print('解析站点地图中,请稍后……')
|
||||
try:
|
||||
result = requests.get(site)
|
||||
big = re.findall('<loc>(.*?)</loc>', 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')
|
||||
|
||||
Reference in New Issue
Block a user