Compare commits

...

5 Commits

Author SHA1 Message Date
b1babac9c9 Merge branch 'main' of daisukide.com:ivampiresp/lavani-download 2024-02-11 00:52:04 +08:00
af1b07c0d3 改进 2024-02-11 00:49:07 +08:00
881f4e39af 删除失效的 token 2024-02-11 00:48:38 +08:00
847e5d5baa Merge branch 'set-secret-detection-config-2' into 'main'
在 `.gitlab-ci.yml` 中配置 Secret 检测,如果该文件不存在则创建此文件

See merge request ivampiresp/lavani-download!1
2024-02-10 01:31:12 +08:00
b8c8e867fc .gitlab-ci.yml 中配置 Secret 检测,如果该文件不存在则创建此文件 2024-02-10 01:30:47 +08:00
3 changed files with 17 additions and 1 deletions

9
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,9 @@
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
include:
- template: Security/Secret-Detection.gitlab-ci.yml

View File

@ -1,7 +1,7 @@
import os import os
baseurl = "https://anime-api.5t5.top/v2" baseurl = "https://anime-api.5t5.top/v2"
token = "lDr7fxW8tDFoY2CdySoaEs1gCaiA3dUP1GwIe6Khg" token = ""
node = "2AG_CF" node = "2AG_CF"
save_path="./downloads" save_path="./downloads"

7
get.py
View File

@ -11,6 +11,13 @@ def downloadAnime(id, filepath):
}) })
for episode in episodes: for episode in episodes:
# if ["parseResult"] not found
if "parseResult" not in episode:
print("parseResult not found")
print(episode)
continue
ext = episode["parseResult"]["extensionName"]["raw"] ext = episode["parseResult"]["extensionName"]["raw"]
filename_download = os.path.join(filepath, episode["name"] + '.' + ext + ".downloading") filename_download = os.path.join(filepath, episode["name"] + '.' + ext + ".downloading")
filename_done = os.path.join(filepath, episode["name"] + '.' + ext) filename_done = os.path.join(filepath, episode["name"] + '.' + ext)