Add debug output on matched XPath/CSS expression.
This commit is contained in:
parent
1d2e1f2dd1
commit
5bd2a49f48
1 changed files with 6 additions and 2 deletions
|
@ -468,9 +468,13 @@ class _ParserScraper(Scraper):
|
||||||
try:
|
try:
|
||||||
for attrib in html_link_attrs:
|
for attrib in html_link_attrs:
|
||||||
if attrib in match.attrib:
|
if attrib in match.attrib:
|
||||||
searchUrls.append(match.get(attrib))
|
searchUrl = match.get(attrib)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
searchUrls.append(str(match))
|
searchUrls = str(match)
|
||||||
|
out.debug(u'Matched URL %r with pattern %s' %
|
||||||
|
(searchUrl, search))
|
||||||
|
searchUrls.append(searchUrl)
|
||||||
|
|
||||||
if not cls.multipleImagesPerStrip and searchUrls:
|
if not cls.multipleImagesPerStrip and searchUrls:
|
||||||
# do not search other links if one pattern matched
|
# do not search other links if one pattern matched
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue