mirror of https://github.com/scrapy/scrapy.git
fix missing import errors
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40454
This commit is contained in:
parent
dd37bb5a4c
commit
3b7f282bbd
|
|
@ -3,8 +3,8 @@ Monkey patches
|
|||
|
||||
These are generally a bad idea.
|
||||
"""
|
||||
from twisted.web.client import HTTPClientFactory, HTTPPageGetter
|
||||
import twisted
|
||||
from twisted.web.client import HTTPClientFactory
|
||||
|
||||
|
||||
# Extend limit for BeautifulSoup parsing loops
|
||||
|
|
@ -49,6 +49,10 @@ def patch_HTTPClientFactory_gotHeaders():
|
|||
setattr(HTTPClientFactory, 'gotHeaders', _new_gotHeaders)
|
||||
|
||||
def patch_HTTPPageGetter_handleResponse():
|
||||
from twisted.web.client import PartialDownloadError, HTTPPageGetter
|
||||
from twisted.python import failure
|
||||
from twisted.web import error
|
||||
|
||||
def _handleResponse(self, response):
|
||||
if self.quietLoss:
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in New Issue