scrapy-playwright
scrapy-playwright copied to clipboard
How to stop closing browser
trafficstars
I start one chrome browser at cdp port 40000
i use PLAYWRIGHT_CDP_URL = "http://localhost:40000" in my setting file
but every time scrapy start to work,
it will create new browser,and does't use my openning chrome.
hope someone can help solve this.
In my python code,i use context = browser.contexts[0] if browser.contexts else browser.new_context() page = context.pages[len(context.pages) - 1] if context.pages else context.new_page()
to keep opening in one page to work and keep chrome always running.