7 lines
232 B
Python
7 lines
232 B
Python
|
|
def get_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')}")
|