web-scraping - requests_html render() 抛出 OSError: [WinError 14001]
问题描述
您好,我正在尝试使用 python 模块 requests-html 进行网络抓取,以处理页面https://www.monster.com/jobs/search?q=Software+Engineer&where=上的动态内容。我的代码是:
from requests_html import HTMLSession
url = 'https://www.monster.com/jobs/search?q=Software+Engineer&where='
session = HTMLSession()
response = session.get(url)
response.html.render()
但是当我运行 response.html.render() 我得到这个错误
OSError: [WinError 14001] The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail
我第一次运行 render() 我得到了
[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
[W:pyppeteer.chromium_downloader]
chromium download done.
[W:pyppeteer.chromium_downloader] chromium extracted to: C:\Users\user\AppData\Local\pyppeteer\pyppeteer\local-chromium\588429
但是文件路径不存在,但 pyppeteer 实际上是一个已安装的包(pyppeteer==0.2.5)。有谁知道发生了什么?
解决方案
您遇到此问题是因为铬设置失败。
您可以尝试重新安装 request_html,或者我所做的就是从 Windows 商店中的 python 切换到从 python 网站下载,然后再次安装 request_html。
在使用下载的 python 正确设置所有内容后,我从商店切换回 python 3.9,一切仍然正常。
推荐阅读
- android-ndk - 没有虚拟方法 getBaseContext()Landroid/content/Context #litho
- ionic-framework - 如何使离子项目在离子中可选
- flutter - 无法写入包含地图的列表
- dart - dart await 构造函数
- android - 如何在应用程序中静音按钮的声音?
- javascript - 如何在nodejs中获取响应标头的值
- apache-spark - PySpark 在时间戳之间加载文件
- android - Dex Builder 期望当我在同一个应用程序中使用 Facebook Sdk 和 Facebook Audience Network SDK 时?
- ionic-framework - 如何在离子中为整页应用背景颜色
- android - 如何在使用java编写Android之前从firebase数据库中读取已经存在的数据