Skip to content
Permalink
Browse files

xpath not findall

  • Loading branch information
da2x committed Sep 1, 2015
1 parent a970c13 commit 79833b8b86d9f9ff89a496284d043add01056b29
Showing with 1 addition and 1 deletion.
  1. +1 −1 nikola/nikola.py
@@ -1104,7 +1104,7 @@ def rewrite_links(self, doc, src, lang):
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, lang), resolve_base_href=False)

# lxml ignores srcset in img and source elements, so do that by hand
objs = list(doc.findall('(*//img|*//source)'))
objs = list(doc.xpath('(*//img|*//source)'))
for obj in objs:
if 'srcset' in obj.attrib:
urls = [u.strip() for u in obj.attrib['srcset'].split(',')]

0 comments on commit 79833b8

Please sign in to comment.
You can’t perform that action at this time.