【发布时间】:2022-07-20 18:00:23
【问题描述】:
是否可以在 Scrapy shell 中调用 Playwright?
我想使用一个 shell 来测试我的 xpath,我打算将它放在一个包含 Scrapy Playwright 的蜘蛛中。
我的 scrapy 设置文件具有通常的 Playwright 设置:
# Scrapy Playwright Setup
DOWNLOAD_HANDLERS = {
"http": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
"https": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
}
TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor"
【问题讨论】:
标签: web-scraping scrapy playwright scrapy-shell