【问题标题】:requests_html render() throwing OSError: [WinError 14001]requests_html render() 抛出 OSError: [WinError 14001]
【发布时间】:2021-04-01 01:59:29
【问题描述】:

您好,我正在尝试使用 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)。有人知道发生了什么吗?

【问题讨论】:

    标签: web-scraping python-requests-html


    【解决方案1】:

    您遇到此问题是因为 chromium 设置失败。

    您可以尝试重新安装 request_html,或者我所做的就是从 Windows 商店的 python 切换到从 python 网站下载,然后再次安装 request_html。

    在使用下载的 python 正确设置所有内容后,我从商店切换回 python 3.9,一切仍然正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-02
      • 1970-01-01
      • 2022-08-23
      • 2022-10-19
      • 2021-06-28
      • 2021-07-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多