mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
更新代码
This commit is contained in:
parent
5966c970ba
commit
8cf576f16b
2
main.py
2
main.py
@ -46,7 +46,7 @@ def program():
|
||||
xhs = XHS(**Settings().run())
|
||||
if ids := Batch().read_txt():
|
||||
for i in ids:
|
||||
xhs.extract(i.rstrip('\n'), download=True)
|
||||
xhs.extract(i, download=True)
|
||||
else:
|
||||
while True:
|
||||
if url := input("请输入小红书作品链接:"):
|
||||
|
||||
@ -35,5 +35,5 @@ class Batch:
|
||||
def read_txt(self) -> list:
|
||||
if self.file.is_file():
|
||||
with self.file.open("r") as f:
|
||||
return f.readlines()
|
||||
return [i.rstrip('\n') for i in f.readlines()]
|
||||
return []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user