Downloader Middleware to support Playwright in Scrapy & Gerapy

This is a package for supporting Playwright in Scrapy, also this
package is a module in Gerapy.

Installation

pip3 install gerapy-playwright

Usage

You can use PlaywrightRequest to specify a request which uses playwright to render.

For example:

yield PlaywrightRequest(detail_url, callback=self.parse_detail)

And you also need to enable PlaywrightMiddleware in DOWNLOADER_MIDDLEWARES:

DOWNLOADER_MIDDLEWARES = {
    'gerapy_playwright.downloadermiddlewares.PlaywrightMiddleware': 543,
}

Congratulate, you’ve finished the all of the required configuration.

If you run the Spider again, Playwright

 

 

 

To finish reading, please visit source site