【问题标题】:Scrapy Splash shows loading on webpageScrapy Splash 显示在网页上加载
【发布时间】:2018-02-20 04:53:08
【问题描述】:

我正在尝试爬取this page 但是页面卡在加载中。

我正在使用 Scrapy==1.5.0 scrapy-splash==0.7.2

我什至将等待时间更改为 7 秒。但问题仍然存在。有什么解决办法吗?

【问题讨论】:

    标签: web-scraping scrapy scrapy-splash


    【解决方案1】:

    尝试使用 wait_for_element lua 脚本来确保加载您所追求的 html。它可能需要超过 7 秒的时间,但至少它会加载元素而不需要固定的超时时间。 Splash 加载页面的时间可能比常规网络浏览器长。

    https://github.com/scrapinghub/splash/blob/master/splash/examples/wait-for-element.lua

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-04
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 2019-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多