[MRG+1] Add template for a downloader middleware #2755
Merged
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. |
aperezalbela
Jun 1, 2017
s/respsonse/response
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. |
aperezalbela
Jun 1, 2017
•
s/middelware/middleware
s/and/an
s/middelware/middleware
s/and/an
24f52d8
to
aaaa4da
Thanks for spotting those typos @aperezalbela ! |
LGTM. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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