Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

removed 'domain' from Request attributes and constructor arguments

Pablo Hoffman314bbabb30dc
diff --git a/scrapy/trunk/scrapy/core/manager.py b/scrapy/trunk/scrapy/core/manager.py
index 821405aaa..a699c5346 100644
--- a/scrapy/trunk/scrapy/core/manager.py
+++ b/scrapy/trunk/scrapy/core/manager.py
@@ -129,10 +129,7 @@ class ExecutionManager(object):
# requests
for request in requests:
- if request.domain:
- spider = spiders.fromdomain(request.domain)
- else:
- spider = spiders.fromurl(request.url)
+ spider = spiders.fromurl(request.url)
if not spider:
log.msg('Could not find spider for %s' % request, log.ERROR)
continue
diff --git a/scrapy/trunk/scrapy/http/request.py b/scrapy/trunk/scrapy/http/request.py
index ff5e21c8f..876d056fa 100644
--- a/scrapy/trunk/scrapy/http/request.py
+++ b/scrapy/trunk/scrapy/http/request.py
@@ -19,7 +19,7 @@ class Request(object):
def __init__(self, url, callback=None, method='GET',
body=None, headers=None, cookies=None, meta=None,
- url_encoding='utf-8', dont_filter=None, domain=None):
+ url_encoding='utf-8', dont_filter=None):
self.encoding = url_encoding # this one has to be set first
self.set_url(url)
@@ -42,8 +42,6 @@ class Request(object):
self.headers = Headers(headers or {}, encoding=url_encoding)
# dont_filter be filtered by scheduler
self.dont_filter = dont_filter
- #allows to directly specify the spider for the request
- self.domain = domain
self.meta = {} if meta is None else dict(meta)
self.cache = {}