scrapy 杂剧作家如何设置“无头”?,

bxjv4tth  于 2022-11-09  发布在  其他
关注(0)|答案(1)|浏览(154)

在杂剧作家中,如何设置“无头=假”。我正在尝试这样的东西。

def start_requests(self):
        yield scrapy.Request(
            url=url, 
            callback = self.parse, 
            meta= dict(
                    playwright = True,
                    playwright_include_page = True,
                    playwright_page_coroutines = [
                    PageCoroutine("click", selector = "//input[@name='typeAheadInputField']"),

                            ]
                        )
        )
        return super().start_requests()

    def parse(self, response):
        pass
9rygscc1

9rygscc11#

settings.py

PLAYWRIGHT_LAUNCH_OPTIONS = {"headless": False}

相关问题