diff --git a/app/lists/bc2.py b/app/lists/bc2.py index 933e840..ffc67d3 100644 --- a/app/lists/bc2.py +++ b/app/lists/bc2.py @@ -1,6 +1,6 @@ import builtins from datetime import datetime -from typing import List +from typing import List, Dict, Union from pydantic import BaseModel, Field @@ -33,7 +33,8 @@ class BypassCensorship2(BaseModel): title = "Bypass Censorship Version 2" -def mirror_sites(): +def mirror_sites(provider: str = "cloudfront") -> Dict[ + str, Union[str, List[Dict[Union[str, List[Dict[str, str]]]]]]]: return { "version": "2.0", "sites": [{ @@ -55,7 +56,10 @@ def mirror_sites(): "updated_at": str(a.updated), "url": a.url } for a in x.proxies if - a.url is not None and not a.deprecated and not a.destroyed and a.provider == "cloudfront" + a.url is not None + and not a.deprecated + and not a.destroyed + and a.provider == provider ]} for x in Origin.query.order_by(Origin.domain_name).all() if x.destroyed is None ] }