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
[MRG+1] Add template for a downloader middleware #2755
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2755 +/- ##
=======================================
Coverage 84.69% 84.69%
=======================================
Files 164 164
Lines 9189 9189
Branches 1369 1369
=======================================
Hits 7783 7783
Misses 1154 1154
Partials 252 252 |
return None | ||
|
||
def process_response(self, request, response, spider): | ||
# Called with the respsonse returned from the downloader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/respsonse/response
|
||
def process_exception(self, request, exception, spider): | ||
# Called when a download handler or a process_request() | ||
# (from other downloader middelware) raises and exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/middelware/middleware
s/and/an
24f52d8
to
aaaa4da
Compare
Thanks for spotting those typos @aperezalbela ! |
LGTM. |
While testing downloader middleware with media pipeline (for #2753 (comment)), I looked for a sample downloader middleware and found only a spider middleware template.
I personally never remember what methods to implement, nor what they should return, hence the verbose comments in the template.
Related/alternative #2633