|
|
@ -58,7 +58,6 @@ def rewritelinks (html):
|
|
|
|
href = a.attrib.get('href')
|
|
|
|
href = a.attrib.get('href')
|
|
|
|
if a.findall(".//img") and 'File:' in href: # ensure a has child: img
|
|
|
|
if a.findall(".//img") and 'File:' in href: # ensure a has child: img
|
|
|
|
a.attrib['href'] = 'javascript:void(0);' # disable href
|
|
|
|
a.attrib['href'] = 'javascript:void(0);' # disable href
|
|
|
|
print('a wrapping img:', ET.tostring(a))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for a in t.findall(".//*[@href]"):
|
|
|
|
for a in t.findall(".//*[@href]"):
|
|
|
|
linkclass = a.attrib.get("class", "")
|
|
|
|
linkclass = a.attrib.get("class", "")
|
|
|
|