新增配置文件

This commit is contained in:
JoeamAmier
2023-08-30 22:43:49 +08:00
parent dd3a8d373d
commit c9aa2d3d1a
2 changed files with 17 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
from source import Settings
from source import XHS
def example():
"""使用示例"""
"""代码示例"""
# 测试链接
error_demo = "https://www.xiaohongshu.com/explore/"
image_demo = "https://www.xiaohongshu.com/explore/64d1b406000000000103ee8d"
@@ -29,7 +30,7 @@ def example():
def main():
xhs = XHS()
xhs = XHS(**Settings().run()) # 配置文件生效
while True:
if url := input("请输入小红书作品链接:"):
xhs.extract(url, download=True)