更新代码

This commit is contained in:
JoeamAmier 2023-09-15 22:43:59 +08:00
parent 5966c970ba
commit 8cf576f16b
2 changed files with 2 additions and 2 deletions

View File

@ -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("请输入小红书作品链接:"):

View File

@ -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 []