【问题标题】:fail to crawl a dynamic loading web page using scrapy-splash无法使用 scrapy-splash 抓取动态加载网页
【发布时间】:2021-01-12 22:54:13
【问题描述】:

您好。我是scrapy-splash的新手。 我尝试使用scrapy-splash从以下网页中提取汽车信息 https://www.lexusserramonte.com/new-inventory/index.htm 我尝试了很多,只是不起作用。与只使用没有启动插件的scrapy相比没有什么区别。

只是想知道任何人都可以从该 URL 中提取信息吗?如果可以,请分享您的代码。 非常感谢

【问题讨论】:

标签: web-scraping scrapy web-crawler scrapy-splash


【解决方案1】:

您不需要为此任务使用 splash。您只需对 API 调用进行逆向工程。

所有需要的汽车信息都可以通过这个链接找到https://www.lexusserramonte.com/apis/widget/INVENTORY_LISTING_DEFAULT_AUTO_NEW:inventory-data-bus1/getInventory?compositeType=new

【讨论】:

  • 谢谢!!是非常好的选择!!!你是怎么找到的?从页面源或检查请求?我想了解更多,因为我也需要分页
  • 使用检查工具的“网络”选项卡检查站点导航期间执行了哪些 xhr 请求。
【解决方案2】:

enter image description here

我正在禁用私人模式下运行启动 docker run -it -p 8050:8050 scrapinghub/splash --disable-private-mode

任何人都可以看看并阐明这一点......

【讨论】:

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