-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module 'scrapy_selenium' doesn't define any object named 'SeleniumDownloadHandler' #3
Comments
Probably you forgot to update the docs. Also tried
It still fails
|
@tumregels Did you found a solution for this? |
@Mikhail010 tried my best but failed |
excuse me =-= I don't want to use splash,and I found this plugin,how does it work well? because I see the latest commit is one years ago, a little afraid to use…… |
@tumregels I got it working with your suggestion and setting everything inside the spider class like custom settings. class MySpider(scrapy.Spider):
... |
@CatSirSir I struggled to get it working but after that it has being working fine. Take into account that I started using it last week so I cannot give you a broad opinion. If I were you I would give it a try, I also use splash but It is giving me troubles with sites with angular and other with the ability to detect headless browsers. |
@Mikhail010 hi , i fix it by this pr #6 |
Thanks @Mikhail010 I get it working with such configs: selenium-hub:
image: selenium/hub
networks:
- back
ports:
- 4444:4444
chrome:
image: selenium/node-chrome
links:
- selenium-hub:hub
environment:
- HUB_PORT_4444_TCP_ADDR=selenium-hub:4444/grid/register/
- GRID_TIMEOUT=180 # Default timeout is 30s might be low for Selenium
volumes:
- /dev/shm:/dev/shm
networks:
- back
networks:
back:
driver: bridge
In spider: from scrapy_headless import HeadlessRequest
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
class TestSpider(scrapy.Spider):
name = 'test'
custom_settings = {
'SELENIUM_GRID_URL': 'http://selenium-hub:4444/wd/hub', # Example for local grid with docker-compose
'SELENIUM_NODES': 1, # Number of nodes(browsers) you are running on your grid
'SELENIUM_CAPABILITIES': DesiredCapabilities.CHROME,
'DOWNLOAD_HANDLERS': {
"http": "scrapy_headless.HeadlessDownloadHandler",
"https": "scrapy_headless.HeadlessDownloadHandler",
}
} |
In the docs you mention
but in this plugin there is no such
SeleniumDownloadHandler
.The text was updated successfully, but these errors were encountered: