Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ SELENIUM_CAPABILITIES = DesiredCapabilities.CHROME # Example for Chrome

# You need also to change the default download handlers, like so:
DOWNLOAD_HANDLERS = {
"http": "scrapy_selenium.SeleniumDownloadHandler",
"https": "scrapy_selenium.SeleniumDownloadHandler",
"http": "scrapy_headless.HeadlessDownloadHandler",
"https": "scrapy_headless.HeadlessDownloadHandler",
}
```

Expand Down
4 changes: 4 additions & 0 deletions scrapy_headless/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ def get_driver(self, spider):
self._drivers.add(driver)
self._data.driver = driver
return driver

@classmethod
def from_crawler(cls, crawler):
return cls(crawler.settings)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="scrapy-headless",
version="0.0.1",
version="0.0.2",
license="BSD",
description="Download Handler for using Scrapy with headless browsers",
maintainer="Henrique Coura",
Expand Down