Skip to content

Commit

Permalink
Update download.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RainPPR authored Feb 4, 2025
1 parent 288f1f8 commit 0fe7d29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/download.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import sys
import common
import threading
import random

def download(id, path):
data = common.fetch_json(f'https://s-file-1.ykt.cbern.com.cn/zxx/ndrv2/resources/tch_material/details/{id}.json')
data = common.fetch_json(f'https://s-file-{random.randint(1, 3)}.ykt.cbern.com.cn/zxx/ndrv2/resources/tch_material/details/{id}.json')
path = path + data['global_title']['zh-CN'] + '.pdf'
print(f'开始下载:{data['global_title']['zh-CN']}.pdf')
for item in data['ti_items']:
Expand Down

0 comments on commit 0fe7d29

Please sign in to comment.