mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-26 09:38:53 -05:00
checkdeadlinks: Also check for images sources, and check each unique URL only once.
This commit is contained in:
parent
615d091877
commit
358fce4443
@ -87,13 +87,14 @@ def main():
|
||||
xepfile = 'xep-' + xepnum + '.xml'
|
||||
thexep = parse(xepfile)
|
||||
|
||||
links = thexep.getElementsByTagName("link")
|
||||
deadlinks = 0
|
||||
if verbose:
|
||||
print 'Checking XEP-' + xepnum + ':'
|
||||
|
||||
for link in links:
|
||||
url = link.getAttribute("url")
|
||||
urls = [link.getAttribute("url") for link in thexep.getElementsByTagName("link")]
|
||||
urls += [image.getAttribute("src") for image in thexep.getElementsByTagName("img")]
|
||||
|
||||
for url in set(urls):
|
||||
if is_dead(url):
|
||||
deadlinks += 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user