求一个后台刷新软件,单位考核要求阅读量,不要求IP更换,现在用的是浏览器刷新,多开后占用资源大,刷新速度慢,多开个数少,想求一款软件,可以后台多线程刷新,以前用的是美篇非常好有,现在不行了,求大神帮助。 的是, 软件
尝试使用selenium。通过设置无头的形式进行循环操作,比手工快。参考我之前多线程抓取数据的部分代码 交给AI即可处理。环境为:python+webdriver [Python] 纯文本查看 复制代码### 配置浏览器选项 chrome_options = webdriver.ChromeOptions() # chrome_options.add_argument('--headless') # 启用无头模式 chrome_options.add_argument('--disable-dev-shm-usage') # 避免资源限制问题 # 使用多线程处理 with ThreadPoolExecutor(max_workers=5) as executor: # 最大并发线程数为 5 futures = [executor.submit(process_detail_link, detail_url, target_sheet_name) for detail_url, target_sheet_name in tasks] for future in as_completed(futures): try: future.result() # 等待线程完成 except Exception as e: print(f"处理线程时发生错误:{e}")