mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 06:57:16 +08:00
更新代码
This commit is contained in:
@@ -10,6 +10,7 @@ __all__ = ['Download']
|
||||
|
||||
class Download:
|
||||
manager = Manager()
|
||||
temp = Path("./temp")
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -27,11 +28,12 @@ class Download:
|
||||
}
|
||||
self.chunk = chunk
|
||||
|
||||
@staticmethod
|
||||
def init_root(path: str, folder: str) -> Path:
|
||||
def init_root(self, path: str, folder: str) -> Path:
|
||||
root = Path(path).joinpath(folder)
|
||||
if not root.is_dir():
|
||||
root.mkdir()
|
||||
if not self.temp.is_dir():
|
||||
self.temp.mkdir()
|
||||
return root
|
||||
|
||||
def run(self, urls: list, name: str):
|
||||
|
||||
Reference in New Issue
Block a user