改成每3小时执行一次
This commit is contained in:
@@ -2,7 +2,7 @@ name: Update xiaosa
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 3 * * *"
|
- cron: "20 */3 * * *"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
+2
-2
@@ -6,7 +6,7 @@ import json
|
|||||||
# 下载伪 JSON 文本
|
# 下载伪 JSON 文本
|
||||||
def fetch_raw_json():
|
def fetch_raw_json():
|
||||||
url = "https://ua.fongmi.eu.org/box.php?url=https%3A%2F%2Fwww.xn--sss604efuw.com%2Ftv"
|
url = "https://ua.fongmi.eu.org/box.php?url=https%3A%2F%2Fwww.xn--sss604efuw.com%2Ftv"
|
||||||
resp = requests.get(url, timeout=10)
|
resp = requests.get(url, timeout=30)
|
||||||
resp.encoding = 'utf-8'
|
resp.encoding = 'utf-8'
|
||||||
return resp.text
|
return resp.text
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ def extract_and_save_spider(json_text):
|
|||||||
full_spider = match.group(1)
|
full_spider = match.group(1)
|
||||||
spider_url = full_spider.split(";")[0]
|
spider_url = full_spider.split(";")[0]
|
||||||
print(f"📥 下载 spider 文件: {spider_url}")
|
print(f"📥 下载 spider 文件: {spider_url}")
|
||||||
resp = requests.get(spider_url, timeout=10)
|
resp = requests.get(spider_url, timeout=30)
|
||||||
with open("fan.txt", "wb") as f:
|
with open("fan.txt", "wb") as f:
|
||||||
f.write(resp.content)
|
f.write(resp.content)
|
||||||
print("✅ 已保存为 fan.txt")
|
print("✅ 已保存为 fan.txt")
|
||||||
|
|||||||
Reference in New Issue
Block a user