|
@@ -54,13 +54,15 @@ if __name__ == "__main__":
|
|
|
if "href" not in link.attrs:
|
|
|
continue
|
|
|
href = link.attrs["href"]
|
|
|
- if "/documents/" in href:
|
|
|
+ if "documents/" in href:
|
|
|
if "title" in link.attrs.keys():
|
|
|
title = link.attrs["title"]
|
|
|
else:
|
|
|
title = link.contents[0]
|
|
|
if href.startswith("/documents"):
|
|
|
href = "https://unfccc.int" + href
|
|
|
+ elif href.startswith("documents"):
|
|
|
+ href = "https://unfccc.int/" + href
|
|
|
# Only add pages in the format https://unfccc.int/documents/65587
|
|
|
# to further downloads
|
|
|
if str(Path(href).parent).endswith("documents"):
|