Skip to content
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

Insensible middleware priority recommendations #47

Open
3hhh opened this issue Sep 19, 2020 · 2 comments
Open

Insensible middleware priority recommendations #47

3hhh opened this issue Sep 19, 2020 · 2 comments

Comments

@3hhh
Copy link

3hhh commented Sep 19, 2020

In your README you recommend setting

    'rotating_proxies.middlewares.RotatingProxyMiddleware': 610,
    'rotating_proxies.middlewares.BanDetectionMiddleware': 620,

This however is insensible as the default settings have 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware': 590, which means that a custom response_is_ban(self, request, response) implementation receives a gzipped response and response.css('whatever') leads to exceptions.

To avoid that, something like

    'rotating_proxies.middlewares.RotatingProxyMiddleware': 582,
    'rotating_proxies.middlewares.BanDetectionMiddleware': 583,

makes more sense.

@KostyaBovt
Copy link

have the same issue
@3hhh does changing original order break any functionality?

@3hhh
Copy link
Author

3hhh commented Oct 16, 2022

None that I'm aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants