Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/fosslight_util/_get_downloadable_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
def extract_name_version_from_link(link):
oss_name = ""
oss_version = ""
matched = False
if link.startswith("www."):
link = link.replace("www.", "https://www.", 1)
for key, value in constant.PKG_PATTERN.items():
Expand Down Expand Up @@ -55,7 +56,10 @@ def extract_name_version_from_link(link):
if key in ["pypi", "maven", "npm", "npm2", "pub", "go"]:
oss_version, link = get_latest_package_version(link, key, origin_name)
logger.info(f'Try to download with the latest version:{link}')
matched = True
break
if not matched:
key = ""
return oss_name, oss_version, link, key


Expand Down