common-updater-scripts,directoryListingUpdater: handle ${pname}_${version} file names

these are found for example in wikimedia's directories:
<https://dumps.wikimedia.org/other/kiwix/zim/wikipedia/>
This commit is contained in:
Colin
2024-10-09 23:25:52 +00:00
parent 1366d1af8f
commit 26feb28758
@@ -61,7 +61,7 @@ if __name__ == "__main__":
link_url = link.get("href", None)
if link_url is not None:
match = re.fullmatch(
rf"(.*/)?{args.pname}-([\d.]+?(-[\d\w.-]+?)?)(\.tar)?(\.[^.]*)", link_url
rf"(.*/)?{args.pname}[-_]([\d.]+?(-[\d\w.-]+?)?)(\.tar)?(\.[^.]*)", link_url
)
if match:
version = match.group(2)