13 lines
385 B
Python
13 lines
385 B
Python
|
|
def get_base_url(site: dict):
|
|
if (site.get("user") == "" and site.get("password") == ""):
|
|
return (f"http://{site.get('url')}")
|
|
else:
|
|
return (f"http://{site.get('user')}:{site.get('password')}@{site.get('url')}")
|
|
|
|
def get(dictionnarys: list, key: str):
|
|
lst = []
|
|
for dictionnary in dictionnarys:
|
|
lst.append(dictionnary.get(key))
|
|
return (lst)
|