mirror of
https://github.com/FutaGuard/LowTechFilter.git
synced 2025-06-21 05:21:02 +08:00
⚡ 改進 NRD 下載效率
This commit is contained in:
parent
8ce12d151f
commit
e2324cd096
@ -61,12 +61,12 @@ class Downloader:
|
||||
today = arrow.utcnow()
|
||||
task = []
|
||||
|
||||
for i in range(1, 30):
|
||||
date = today.shift(days=-i)
|
||||
task.append(loop.create_task(self.fetch(date)))
|
||||
loop.run_until_complete(asyncio.gather(*task))
|
||||
for i in range(1, 30, 5):
|
||||
for j in range(i, i + 5):
|
||||
date = today.shift(days=-j)
|
||||
task.append(loop.create_task(self.fetch(date)))
|
||||
loop.run_until_complete(asyncio.gather(*task))
|
||||
asyncio.run(self.write())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Downloader().run()
|
||||
|
Loading…
x
Reference in New Issue
Block a user