-
Notifications
You must be signed in to change notification settings - Fork 451
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
Middleware settings for scrapy-splash with scrapy-cluster, SplashRequest not work #101
Comments
I think it could be related to dupefilter used by crawling.distributed_scheduler.DistributedScheduler - this dupefilter uses request_fingerprint function which doesn't work correctly for Splash requests. Default dupefilter doesn't take request.meta values in account, while requests to Splash may differ only in request.meta until they are fixed by a downloader middleware. |
Facing the same issue. |
See also: istresearch/scrapy-cluster#94. |
so the scrapy-splash can't work with scrapy-cluster now? |
Yes, it can't. Currently one have to fork & fix scrapy-cluster to make them work together. |
Thanks to @kmike Do you happen to know where the problem is? |
@wenxzhen I'm not a scrapy-cluster user myself, but a brief look results are in this comment: #101 (comment) |
Thanks to @kmike
Now it works |
@wenxzhen Could you please share some core code with ur or sent a PR to this repo? |
@hustshawn the basic idea is to not use the scrapy-splash stuffs, but to make use of the functionalities of the scrapy-cluster + scrapy. The followings are mainly for PoC without optimization.
the "splash": 1 is to tell that the reuqest needs to go to Splash with Http API directly
|
Got your idea. Thanks a lot. @wenxzhen |
Could you please do PR with this code? Parse JS is really useful feature. |
we need to ask @kmike whether the 'basic' solution is acceptable or not? If yes, we can start the PR work. |
@wenxzhen did you create a download_handler middleware to implement your solution or did you modify the HTTP11DownloadHandler directly? |
I need to do both as I need to bypass the proxy to Splash too |
@wenxzhen did you solve it? i also need to proxy and splash. |
@FinnFrotscher check the code snippets above, hope it can help. |
It seems like scrapy/scrapy#900 could be a good first step towards fixing this. |
In single node scrapy project, the settings like below as your document indicate works well.
While if I integrate with the
scrapy-cluster
with below settings, the request withSplashRequest
may not successfully send request tosplash
, so thesplash
not will not respond. Actually, thesplash
itself works fine when I just directly access it with constructed url fromrender.html
endpoint.Anyone knows what's going wrong with the settings?
The text was updated successfully, but these errors were encountered: