diff --git a/src/utils.py b/src/utils.py index dcf66f5..e98fa9b 100644 --- a/src/utils.py +++ b/src/utils.py @@ -1,5 +1,20 @@ +from dataclasses import dataclass from datetime import datetime from pathlib import Path +from urllib.parse import urlunparse + + +@dataclass +class BaseUrl: + netloc: str + scheme: str = "https" + path: str = "" + params: str = "" + query: str = "" + fragment: str = "" + + def get(self, path: str = ""): + return urlunparse((self.scheme, self.netloc, path, self.params, self.query, self.fragment)) def get_session_id() -> str: