From c82c799d07bdd175405fa23a2b993bed3bf7b667 Mon Sep 17 00:00:00 2001 From: elpolilla Date: Fri, 2 Jan 2009 02:25:17 +0000 Subject: [PATCH] Added ImageLinkExtractor's missing docstring --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40593 --- scrapy/trunk/scrapy/link/extractors.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scrapy/trunk/scrapy/link/extractors.py b/scrapy/trunk/scrapy/link/extractors.py index 48d52d32a..8b830c743 100644 --- a/scrapy/trunk/scrapy/link/extractors.py +++ b/scrapy/trunk/scrapy/link/extractors.py @@ -87,6 +87,15 @@ class RegexLinkExtractor(LinkExtractor): return any(allowed) and not any(denied) class ImageLinkExtractor(object): + '''ImageLinkExtractor objects are intended to extract image links from HTML pages + given certain xpath locations. + + These locations can be passed in a list/tuple either when instanciating the LinkExtractor, + or whenever you call extract_links. + If no locations are specified in any of these places, a default pattern '//img' will be used. + If locations are specified when instanciating the LinkExtractor, and also when calling extract_links, + both locations will be used for that call of extract_links''' + def __init__(self, locations=None): self.locations = tuple(locations) if hasattr(locations, '__iter__') else tuple()