mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
test api push
This commit is contained in:
4
.github/workflows/baidupush.yml
vendored
4
.github/workflows/baidupush.yml
vendored
@@ -9,8 +9,8 @@ on:
|
||||
# - cron: '0 23 * * *' # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
|
||||
|
||||
# on:
|
||||
schedule:
|
||||
- cron: '*/5 * * * *' # 每5分钟一次,测试用
|
||||
# schedule:
|
||||
# - cron: '*/5 * * * *' # 每5分钟一次,测试用
|
||||
|
||||
jobs:
|
||||
bot:
|
||||
|
||||
@@ -13,6 +13,6 @@ if __name__ == '__main__':
|
||||
result = requests.get(url)
|
||||
big = re.findall('<loc>(.*?)</loc>', result.content.decode('utf-8'), re.S)
|
||||
for i in big:
|
||||
print(i)
|
||||
# op_xml_txt = open('xml.txt', 'a')
|
||||
# op_xml_txt.write('%s\n' % i)
|
||||
# print(i)
|
||||
op_xml_txt = open('xml.txt', 'a')
|
||||
op_xml_txt.write('%s\n' % i)
|
||||
|
||||
10
baidupush.sh
10
baidupush.sh
@@ -3,14 +3,8 @@
|
||||
# 确保脚本抛出遇到的错误
|
||||
set -e
|
||||
|
||||
# 检查是否传入了正确的参数
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Please provide the your website as an argument."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 百度链接推送
|
||||
python baidupush.py $1
|
||||
# curl -H 'Content-Type:text/plain' --data-binary @urls.txt "http://data.zz.baidu.com/urls?site=https://vuepress.ghlerrix.cn&token=oUldnU4HZvSTlh0e"
|
||||
python baidupush.py 'www.ghlerrix.cn'
|
||||
curl -H 'Content-Type:text/plain' --data-binary @urls.txt "http://data.zz.baidu.com/urls?site=https://www.ghlerrix.cn&token=oUldnU4HZvSTlh0e"
|
||||
|
||||
rm -rf urls.txt # 删除文件
|
||||
@@ -19,7 +19,7 @@
|
||||
"post-build": "next-sitemap --config next-sitemap.config.js",
|
||||
"export": "next build && next-sitemap --config next-sitemap.config.js && next export",
|
||||
"bundle-report": "ANALYZE=true yarn build",
|
||||
"baidupush": "bash baidupush.sh 'www.ghlerrix.cn'"
|
||||
"baidupush": "bash baidupush.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@giscus/react": "^2.2.6",
|
||||
|
||||
Reference in New Issue
Block a user