From 8148f2a87d0463bf66a3577504b400db7b19e8e2 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Tue, 15 Jul 2025 09:11:53 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Test/T2_GetList.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsLightRag/Test/T2_GetList.py b/dsLightRag/Test/T2_GetList.py index d49c40b9..53fe831a 100644 --- a/dsLightRag/Test/T2_GetList.py +++ b/dsLightRag/Test/T2_GetList.py @@ -45,6 +45,7 @@ if __name__ == '__main__': # 使用json还原为json对象 cookies = json.loads(content) options = Options() + options.add_argument('-headless') # 无头参数,调试时可以注释掉 # 设置headers - 使用微信内置浏览器的User-Agent header = { "HOST": "mp.weixin.qq.com", @@ -137,8 +138,8 @@ if __name__ == '__main__': print(x) # 将返回的地址写入到文件 with open('article_urls.txt', 'w', encoding='utf-8') as f: - for url in article_urls: - f.write(url + '\n') + for record in article_urls: + f.write(record['title']+" "+record['publish_time']+" "+record['url'] + '\n') # 关闭浏览器 driver.quit()