Skip to content
Advertisement

Could this selenium code be recreated using scrapy?

I’m interested in getting a better idea of what scrapy can do. Here is a very simple selenium code that interacts with a website, fills in some boxes, clicks some elements and downloads a file. Could this code be replicated using scrapy?, so that a code is written using scrapy that does the exact same thing.

JavaScript

Advertisement

Answer

"selenium code be recreated using scrapy" is also working fine with SeleniuRequest which is superfast than general selenium. You need scrapy project.It works as headless mode but always get screenshot for each step.

script:

JavaScript

Screenshot

settings.py file:

You have to add the following options in settings.py file

JavaScript

SeleniumRequest

Output:

JavaScript

screenshot of the project looks like

How to download pdf using scrapy

screenshot

Advertisement