Closed josearodrigueze closed 1 year ago
Assuming you're referring to https://pypi.org/project/playwright-stealth/, it should be possible to do it with https://github.com/scrapy-plugins/scrapy-playwright#playwright_page_init_callback. I haven't tested it myself, but something like this:
from playwright_stealth import stealth_async async def init_page(page, request): await stealth_async(page) class StealthSpider(scrapy.Spider): name = "stealth" def start_requests(self): yield scrapy.Request( url="https://example.org", meta={ "playwright": True, "playwright_page_init_callback": init_page, }, )
It works perfect thanks for the help. I really appreciate your help, have a great day.
Assuming you're referring to https://pypi.org/project/playwright-stealth/, it should be possible to do it with https://github.com/scrapy-plugins/scrapy-playwright#playwright_page_init_callback. I haven't tested it myself, but something like this: