When using scrapy-selenium
, how can one keep the browser window open after scraping has finished (or aborted)?
Asked
Active
Viewed 233 times
0

Tomerikoo
- 18,379
- 16
- 47
- 61

stefan.at.kotlin
- 15,347
- 38
- 147
- 270
1 Answers
0
Have you tried adding 'detach' to scrapy-selenium options?
On selenium alone it would look like this:
from selenium.webdriver import ChromeOptions, Chrome
options = ChromeOptions()
options .add_experimental_option("detach", True)
driver = Chrome(chrome_options=options )
On scrapy-selenium probably something like this:
SELENIUM_DRIVER_ARGUMENTS=['detach']

Sam
- 86
- 1
- 5
-
Thanks, I tried with your suggestion, but unfortunately it didn't work ): I don't know where to hook in when using scrapy-selenium, that's the issue. – stefan.at.kotlin Apr 07 '21 at 19:31