Skip to content

Commit

Permalink
feat: 调整验证
Browse files Browse the repository at this point in the history
  • Loading branch information
imruxin committed Nov 4, 2024
1 parent bb2103b commit 0fb3587
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python application
on:
push:
schedule:
- cron: '0 21 * * 1'
- cron: '0 21 */5 * *'

jobs:
build:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: 安装 Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.4
python-version: 3.10

- name: 安装模块
run: |
Expand All @@ -28,8 +28,8 @@ jobs:
python autoUrl.py
- name: 暂存提交
run: |
git config --global user.name 'hl128k'
git config --global user.email 'hl128k@qq.com'
git config --global user.name 'imruxin'
git config --global user.email 'admin@imruxin.com'
export TZ='Asia/Shanghai'
git add .
git commit -m "update" -a
Expand Down
21 changes: 15 additions & 6 deletions autoUrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@
import json
import urllib3
from Crypto.Cipher import AES
import os


def main():
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
with open('./url.json', 'r', encoding='utf-8') as f:
urlJson = json.load(f)
nameList = []
reList = ["https://ghproxy.net/https://raw.githubusercontent.com", "https://raw.kkgithub.com",
"https://gcore.jsdelivr.net/gh", "https://mirror.ghproxy.com/https://raw.githubusercontent.com",
"https://github.moeyy.xyz/https://raw.githubusercontent.com", "https://fastly.jsdelivr.net/gh"]
reRawList = [False, False,
True, False,
False, True]
reList = ["https://ghp.ci/https://raw.githubusercontent.com",
"https://ghproxy.net/https://raw.githubusercontent.com"]
reRawList = [False, False]

# 确保tv目录存在
if not os.path.exists("./tv"):
os.makedirs("./tv")

# 确保子目录存在
for i in range(len(reList)):
sub_dir = f"./tv/{i}"
if not os.path.exists(sub_dir):
os.makedirs(sub_dir)

for item in urlJson:
urlData = get_json(item["url"])
for reI in range(len(reList)):
Expand Down

0 comments on commit 0fb3587

Please sign in to comment.