Skip to content

Commit d193310

Browse files
committed
➕ websites: http without ssl support
1 parent 2b5641d commit d193310

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/websites.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class GenericWebsiteLink(WebsiteLink):
150150
fix_domain: str
151151
subdomains: dict[str, str] | None = None
152152
is_translation: bool = False
153+
is_ssl: bool = True
153154
routes: dict[str, re.Pattern[str]] = {}
154155

155156
def __init__(self, guild: Guild, url: str, spoiler: bool = False) -> None:
@@ -212,7 +213,8 @@ def get_repl(self, route: str, match: re.Match[str]) -> str:
212213
query_string_repl = '?' + '&'.join(rf"{param}=\g<{param}>" for param in params)
213214

214215
return (
215-
"https://{domain}"
216+
"https" if self.is_ssl else "http"
217+
+ "://{domain}"
216218
+ route_repl
217219
+ "{post_path_segments}"
218220
+ query_string_repl

0 commit comments

Comments
 (0)