This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tempfile | |
from scrapy import log | |
from scrapy.http import Request | |
from scrapy.spider import BaseSpider | |
from testspiders.items import Page | |
LOREMIPSUM = '''\ | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed | |
diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Policy(object): | |
def should_cache_request(self, request): | |
pass | |
def should_cache_response(self, response, request): | |
pass | |
def is_cached_response_fresh(self, response, request): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Policy(object): | |
def should_cache_request(self, request): | |
pass | |
def should_cache_response(self, response, request): | |
pass | |
def is_cached_response_fresh(self, response, request): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os.path import join, exists | |
from time import time | |
import cPickle as pickle | |
from w3lib.http import headers_dict_to_raw, headers_raw_to_dict | |
from scrapy import signals | |
from scrapy.http import Headers | |
from scrapy.http.request import Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os.path import join, exists | |
from time import time | |
import cPickle as pickle | |
from w3lib.http import headers_dict_to_raw, headers_raw_to_dict | |
from scrapy import signals | |
from scrapy.http import Headers | |
from scrapy.http.request import Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scrapy/contrib/pipeline/images.py b/scrapy/contrib/pipeline/images.py | |
index 4775590..ec24c70 100644 | |
--- a/scrapy/contrib/pipeline/images.py | |
+++ b/scrapy/contrib/pipeline/images.py | |
@@ -25,6 +25,7 @@ from scrapy.contrib.pipeline.media import MediaPipeline | |
class NoimagesDrop(DropItem): | |
"""Product with no images exception""" | |
+ | |
class ImageException(Exception): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scrapy/log.py b/scrapy/log.py | |
index be2c1fd..83be049 100644 | |
--- a/scrapy/log.py | |
+++ b/scrapy/log.py | |
@@ -1,4 +1,4 @@ | |
-""" | |
+""" | |
Scrapy logging facility | |
See documentation in docs/topics/logging.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scrapy/log.py b/scrapy/log.py | |
index be2c1fd..bc05a50 100644 | |
--- a/scrapy/log.py | |
+++ b/scrapy/log.py | |
@@ -1,4 +1,4 @@ | |
-""" | |
+""" | |
Scrapy logging facility | |
See documentation in docs/topics/logging.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scrapy/core/scraper.py b/scrapy/core/scraper.py | |
index 187c1e9..acbf6ea 100644 | |
--- a/scrapy/core/scraper.py | |
+++ b/scrapy/core/scraper.py | |
@@ -103,7 +103,8 @@ class Scraper(object): | |
self._scrape_next(spider, slot) | |
return _ | |
dfd.addBoth(finish_scraping) | |
- dfd.addErrback(log.err, 'Scraper bug processing %s' % request, \ | |
+ dfd.addErrback(log.err, 'Scraper bug processing %(request)s', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scrapy/core/scraper.py b/scrapy/core/scraper.py | |
index 187c1e9..acbf6ea 100644 | |
--- a/scrapy/core/scraper.py | |
+++ b/scrapy/core/scraper.py | |
@@ -103,7 +103,8 @@ class Scraper(object): | |
self._scrape_next(spider, slot) | |
return _ | |
dfd.addBoth(finish_scraping) | |
- dfd.addErrback(log.err, 'Scraper bug processing %s' % request, \ | |
+ dfd.addErrback(log.err, 'Scraper bug processing %(request)s', |