add PH proxy option (#4395)

This commit is contained in:
Marc Kelechava
2026-01-05 09:52:22 -08:00
committed by GitHub
parent a667bc598b
commit c5251e7115
5 changed files with 16 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ ProxyLocation = typing.Union[
"RESIDENTIAL_MX",
"RESIDENTIAL_IT",
"RESIDENTIAL_NL",
"RESIDENTIAL_PH",
"RESIDENTIAL_ISP",
"NONE",
],

View File

@@ -23,6 +23,7 @@ Available geotargeting options:
- RESIDENTIAL_FR: France
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia

View File

@@ -57,6 +57,7 @@ class ProxyLocation(StrEnum):
RESIDENTIAL_MX = "RESIDENTIAL_MX"
RESIDENTIAL_IT = "RESIDENTIAL_IT"
RESIDENTIAL_NL = "RESIDENTIAL_NL"
RESIDENTIAL_PH = "RESIDENTIAL_PH"
RESIDENTIAL_ISP = "RESIDENTIAL_ISP"
NONE = "NONE"
@@ -95,6 +96,7 @@ class ProxyLocation(StrEnum):
cls.RESIDENTIAL_MX,
cls.RESIDENTIAL_IT,
cls.RESIDENTIAL_NL,
cls.RESIDENTIAL_PH,
}
@staticmethod
@@ -118,6 +120,7 @@ class ProxyLocation(StrEnum):
ProxyLocation.RESIDENTIAL_MX: 2000,
ProxyLocation.RESIDENTIAL_IT: 2000,
ProxyLocation.RESIDENTIAL_NL: 2000,
ProxyLocation.RESIDENTIAL_PH: 2000,
}
return counts.get(proxy_location, 10000)
@@ -142,6 +145,7 @@ class ProxyLocation(StrEnum):
ProxyLocation.RESIDENTIAL_MX: "MX",
ProxyLocation.RESIDENTIAL_IT: "IT",
ProxyLocation.RESIDENTIAL_NL: "NL",
ProxyLocation.RESIDENTIAL_PH: "PH",
}
return mapping.get(proxy_location, "US")
@@ -165,6 +169,7 @@ SUPPORTED_GEO_COUNTRIES = frozenset(
"MX",
"NL",
"NZ",
"PH",
"TR",
"ZA",
}
@@ -307,6 +312,9 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
if proxy_location == ProxyLocation.RESIDENTIAL_NL:
return ZoneInfo("Europe/Amsterdam")
if proxy_location == ProxyLocation.RESIDENTIAL_PH:
return ZoneInfo("Asia/Manila")
if proxy_location == ProxyLocation.RESIDENTIAL_ISP:
return ZoneInfo("America/New_York")