Scrapy or Selenium or Mechanize to scrape web data?

前端 未结 2 1336
清歌不尽
清歌不尽 2021-02-14 03:29

I want to scrape some data from a website.

Basically, the website has some tabular display and shows around 50 records. For more records, the user has to click some butt

相关标签:
2条回答
  • 2021-02-14 03:57

    I would recommend you to go with a combination of Mechanize and ExecJS (https://github.com/sstephenson/execjs) to execute any javascript requests you might come across. I have used those two gems in combination for quite some time now and they do a great job.

    You should choose this instead of Selenium, because it it will be a lot faster compared to having to render the entire page in a headless browser.

    0 讨论(0)
  • 2021-02-14 04:06

    Definitely I'd choose Scrapy. If you can't handle javascript you can try with Scrapy + splash. Scrapy is by far the fastest tool for web scraping that I'm aware of. Good luck!

    0 讨论(0)
提交回复
热议问题