diff --git a/dumpwiki.py b/dumpwiki.py index d28893d..1f883ed 100644 --- a/dumpwiki.py +++ b/dumpwiki.py @@ -55,10 +55,9 @@ def rewritelinks (html): # remove links to wiki File: pages for a in t.findall(".//a[@class='image']"): # select img wrapping a - href = a.attrib.get('href') + href = a.attrib.get('href') if a.findall(".//img") and 'File:' in href: # ensure a has child: img a.attrib['href'] = 'javascript:void(0);' # disable href - print('a wrapping img:', ET.tostring(a)) for a in t.findall(".//*[@href]"): linkclass = a.attrib.get("class", "")