1
0
Fork 0
This commit is contained in:
Daniel Kukula 2024-05-09 20:07:24 +01:00
parent df5fb8acc5
commit d4b5051966
1 changed files with 7 additions and 4 deletions

View File

@ -55,10 +55,13 @@ def response(resp):
def get_source_code_url(links):
source_url = None
for k, v in links.items():
if k.lower() in ["source", "github", "gitlab"]:
return v
if not source_url and k.lower() in ["source", "github", "gitlab"]:
source_url = v
for k, v in links.items():
if "github" in v or "gitlab" in v:
return v
if not source_url and ("github" in v or "gitlab" in v):
source_url = v
return source_url