diff --git a/.github/workflows/main.yml b/.github/workflows/deploy2pages.yml similarity index 94% rename from .github/workflows/main.yml rename to .github/workflows/deploy2pages.yml index 57b0557..687f3fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/deploy2pages.yml @@ -1,4 +1,4 @@ -name: Latest Build +name: Latest Build to GitHub Pages on: schedule: - cron: '0 20 * * 2' # 每周二晚上8点触发 diff --git a/.github/workflows/deploy2upyun.yml b/.github/workflows/deploy2upyun.yml new file mode 100644 index 0000000..90c5811 --- /dev/null +++ b/.github/workflows/deploy2upyun.yml @@ -0,0 +1,28 @@ +name: Latest Build to UPYUN +on: + schedule: + - cron: '0 20 * * 2' # 每周二晚上8点触发 + push: + branches: + - master # 你可以根据需要更改分支名称 +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Run custom script + run: | + sudo apt-get update + sudo apt-get install -y libxml2-utils + chmod +x run.sh + ./run.sh + + - name: Deploy tp upyun + uses: her-cat/upyun-deployer@v1.0.3 + with: + bucket: ${{ secrets.UPYUN_BUCKET }} + operator: ${{ secrets.UPYUN_OPERATOR_NAME }} + password: ${{ secrets.UPYUN_OPERATOR_PWD }} + dir: 'public' + publish_dir: '/' diff --git a/README.md b/README.md index ae058c6..72b3971 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ XML Format Output ### Not compressed (For development) ``` -GET https://chrome-dl.com/api/chrome.xml +GET https://chrome.ntr.sb/api/chrome.xml ``` ### Compressed (For production) ``` -GET https://chrome-dl.com/api/chrome.min.xml +GET https://chrome.ntr.sb/api/chrome.min.xml ``` ## Advanced - Google Updater (Omaha) API diff --git a/src/index.html b/src/index.html index 36a20df..88b872a 100644 --- a/src/index.html +++ b/src/index.html @@ -116,7 +116,7 @@ - + @@ -168,7 +168,7 @@ 点击下载 备选地址 - 缓存服务器 + @@ -192,7 +192,7 @@ 点击下载 备选地址 - 缓存服务器 + @@ -218,7 +218,7 @@ 点击下载 备选地址 - 缓存服务器 + @@ -242,7 +242,7 @@ 点击下载 备选地址 - 缓存服务器 + @@ -268,7 +268,7 @@ 点击下载 备选地址 - 缓存服务器 + @@ -292,7 +292,7 @@ 点击下载 备选地址 - 缓存服务器 + @@ -301,37 +301,21 @@

注意

项目开源地址

- https://github.com/ettingshausen/CheckChrome + https://github.com/GiriNeko/CheckChrome

API(XML 格式)

- https://ettingshausen.github.io/CheckChrome/api/chrome.xml(未压缩)
- https://ettingshausen.github.io/CheckChrome/api/chrome.min.xml(已压缩) + /api/chrome.xml(未压缩)
+ /api/chrome.min.xml(已压缩)

对于需要 Chrome 离线包数据,请使用本站开放的 API,完全没有必要 用 iframe 嵌套或反代本站,或者用爬虫解析本站 HTML 来获取数据。
- - diff --git a/util/generator.sh b/util/generator.sh index 7cbb5f3..aecc1fa 100644 --- a/util/generator.sh +++ b/util/generator.sh @@ -5,14 +5,14 @@ echo '-------------------------------------' for i in $@ do - cache="http://101.96.9.133/" + # cache="http://101.96.9.133/" version=$(sed -n '1p' ./tmp/parse/${i}-result.info) dl_base=$(sed -n '2p' ./tmp/parse/${i}-result.info) dl_alt_base=$(sed -n '3p' ./tmp/parse/${i}-result.info) dl_file=$(sed -n '4p' ./tmp/parse/${i}-result.info) dl="https://"${dl_base}${dl_file} dl_alt="https://"${dl_alt_base}${dl_file} - dl_cache=${cache}${dl_alt_base}${dl_file} + # dl_cache=${cache}${dl_alt_base}${dl_file} sha256=$(sed -n '5p' ./tmp/parse/${i}-result.info) size_raw=$(sed -n '6p' ./tmp/parse/${i}-result.info) size=$(awk 'BEGIN{printf "%.3f",('$size_raw'/'1048576')}')" MB" @@ -21,13 +21,13 @@ do sed -i "s|{{${i}-SHA256}}|$sha256|g" tmp/index.html sed -i "s|{{${i}-dl-main}}|$dl|g" tmp/index.html sed -i "s|{{${i}-dl-alternative}}|$dl_alt|g" tmp/index.html - sed -i "s|{{${i}-dl-cache}}|$dl_cache|g" tmp/index.html + # sed -i "s|{{${i}-dl-cache}}|$dl_cache|g" tmp/index.html sed -i "s|{{${i}-Size}}|$size|g" tmp/index.html sed -i "s|{{${i}-Version}}|$version|g" tmp/chrome.xml sed -i "s|{{${i}-SHA256}}|$sha256|g" tmp/chrome.xml sed -i "s|{{${i}-dl-main}}|$dl|g" tmp/chrome.xml sed -i "s|{{${i}-dl-alternative}}|$dl_alt|g" tmp/chrome.xml - sed -i "s|{{${i}-dl-cache}}|$dl_cache|g" tmp/chrome.xml + # sed -i "s|{{${i}-dl-cache}}|$dl_cache|g" tmp/chrome.xml sed -i "s|{{${i}-Size}}|$size_raw|g" tmp/chrome.xml done \ No newline at end of file diff --git a/util/parse.sh b/util/parse.sh index 5bdb4c5..e672ac6 100644 --- a/util/parse.sh +++ b/util/parse.sh @@ -20,10 +20,16 @@ do sed -i 's|https://||g' ./tmp/parse/${i}.info sed -i 's| ||g' ./tmp/parse/${i}.info + # version sed -n '14p' ./tmp/parse/${i}.info > ./tmp/parse/${i}-result.info + # download base sed -n '8p' ./tmp/parse/${i}.info >> ./tmp/parse/${i}-result.info + # download alternative base sed -n '10p' ./tmp/parse/${i}.info >> ./tmp/parse/${i}-result.info + # download file sed -n '23p' ./tmp/parse/${i}.info >> ./tmp/parse/${i}-result.info + # sha256 sed -n '22p' ./tmp/parse/${i}.info >> ./tmp/parse/${i}-result.info + # size sed -n '24p' ./tmp/parse/${i}.info >> ./tmp/parse/${i}-result.info done