Scrape dynamic data using scrapy [closed]

只谈情不闲聊 提交于 2021-01-29 12:18:43

问题


I would like to scrape option chain of stock from nasdaq website using scrapy (along with other data)

Nasdaq recently updated their website. Here is the url I am talking about.

The data is not loaded with plain spider and in scrapy shell. From the scrapy docs, I need to use scrapy-splash or scrapy-selenium.

I would like to know which one is the right tool for the job before investing my time. Or is there something else that is recommended?

Thanks!


回答1:


For that task you don't need selenium or splash. Instead you can inspect the network tab in chrome developer tools.

The site makes additional request to get data from the following endpoint: https://api.nasdaq.com/api/quote/MSFT/option-chain?assetclass=stocks&limit=0

Cheers



来源:https://stackoverflow.com/questions/57573886/scrape-dynamic-data-using-scrapy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!