Skip to content

Instantly share code, notes, and snippets.

@rmax
Created January 25, 2010 17:24
Show Gist options
  • Save rmax/286046 to your computer and use it in GitHub Desktop.
Save rmax/286046 to your computer and use it in GitHub Desktop.
def test_callable(response):
pass
def capitalize_urls(urls):
for url in urls:
yield url.upper()
class TesSpider(UrlSpider):
url_extractors = [
SgmlUrlExtractor(),
]
url_processors = [
capitalize_urls,
]
url_matchers = [
UrlMatcher(r'URL1', 'testmethod', 'argument'),
UrlMatcher(r'URL2', test_callable, kwargument='argument'),
]
def testmethod(self, response):
return Request('URL3')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment