Skip to content

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

fixed bug and updated old code in googledir example project

Pablo Hoffman91e1e0aff30c
diff --git a/examples/googledir/googledir/pipelines.py b/examples/googledir/googledir/pipelines.py
index 72294dbeb..4fb10626e 100644
--- a/examples/googledir/googledir/pipelines.py
+++ b/examples/googledir/googledir/pipelines.py
@@ -7,7 +7,7 @@ class FilterWordsPipeline(object):
# put all words in lowercase
words_to_filter = ['politics', 'religion']
- def process_item(self, domain, item):
+ def process_item(self, spider, item):
for word in self.words_to_filter:
if word in unicode(item['description']).lower():
raise DropItem("Contains forbidden word: %s" % word)
diff --git a/examples/googledir/googledir/spiders/google_directory.py b/examples/googledir/googledir/spiders/google_directory.py
index 2af52bf1f..b214be283 100644
--- a/examples/googledir/googledir/spiders/google_directory.py
+++ b/examples/googledir/googledir/spiders/google_directory.py
@@ -7,7 +7,7 @@ from googledir.items import GoogledirItem
class GoogleDirectorySpider(CrawlSpider):
name = 'directory.google.com'
- allow_domains = ['directory.google.com']
+ allowed_domains = ['directory.google.com']
start_urls = ['http://directory.google.com/']
rules = (