add PH proxy option (#4395)
This commit is contained in:
@@ -52,6 +52,7 @@ export const ProxyLocation = {
|
|||||||
ResidentialMX: "RESIDENTIAL_MX",
|
ResidentialMX: "RESIDENTIAL_MX",
|
||||||
ResidentialIT: "RESIDENTIAL_IT",
|
ResidentialIT: "RESIDENTIAL_IT",
|
||||||
ResidentialNL: "RESIDENTIAL_NL",
|
ResidentialNL: "RESIDENTIAL_NL",
|
||||||
|
ResidentialPH: "RESIDENTIAL_PH",
|
||||||
ResidentialISP: "RESIDENTIAL_ISP",
|
ResidentialISP: "RESIDENTIAL_ISP",
|
||||||
None: "NONE",
|
None: "NONE",
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export const SUPPORTED_COUNTRY_CODES = [
|
|||||||
"MX",
|
"MX",
|
||||||
"NL",
|
"NL",
|
||||||
"NZ",
|
"NZ",
|
||||||
|
"PH",
|
||||||
"TR",
|
"TR",
|
||||||
"ZA",
|
"ZA",
|
||||||
] as const;
|
] as const;
|
||||||
@@ -40,6 +41,7 @@ export const COUNTRY_NAMES: Record<SupportedCountryCode, string> = {
|
|||||||
MX: "Mexico",
|
MX: "Mexico",
|
||||||
NL: "Netherlands",
|
NL: "Netherlands",
|
||||||
NZ: "New Zealand",
|
NZ: "New Zealand",
|
||||||
|
PH: "Philippines",
|
||||||
TR: "Turkey",
|
TR: "Turkey",
|
||||||
ZA: "South Africa",
|
ZA: "South Africa",
|
||||||
};
|
};
|
||||||
@@ -61,6 +63,7 @@ export const COUNTRY_FLAGS: Record<SupportedCountryCode, string> = {
|
|||||||
MX: "🇲🇽",
|
MX: "🇲🇽",
|
||||||
NL: "🇳🇱",
|
NL: "🇳🇱",
|
||||||
NZ: "🇳🇿",
|
NZ: "🇳🇿",
|
||||||
|
PH: "🇵🇭",
|
||||||
TR: "🇹🇷",
|
TR: "🇹🇷",
|
||||||
ZA: "🇿🇦",
|
ZA: "🇿🇦",
|
||||||
};
|
};
|
||||||
@@ -84,6 +87,7 @@ const PROXY_LOCATION_TO_COUNTRY: Record<string, string> = {
|
|||||||
[ProxyLocation.ResidentialMX]: "MX",
|
[ProxyLocation.ResidentialMX]: "MX",
|
||||||
[ProxyLocation.ResidentialNL]: "NL",
|
[ProxyLocation.ResidentialNL]: "NL",
|
||||||
[ProxyLocation.ResidentialNZ]: "NZ",
|
[ProxyLocation.ResidentialNZ]: "NZ",
|
||||||
|
[ProxyLocation.ResidentialPH]: "PH",
|
||||||
[ProxyLocation.ResidentialTR]: "TR",
|
[ProxyLocation.ResidentialTR]: "TR",
|
||||||
[ProxyLocation.ResidentialZA]: "ZA",
|
[ProxyLocation.ResidentialZA]: "ZA",
|
||||||
};
|
};
|
||||||
@@ -106,6 +110,7 @@ const COUNTRY_TO_PROXY_LOCATION: Record<string, ProxyLocation> = {
|
|||||||
MX: ProxyLocation.ResidentialMX,
|
MX: ProxyLocation.ResidentialMX,
|
||||||
NL: ProxyLocation.ResidentialNL,
|
NL: ProxyLocation.ResidentialNL,
|
||||||
NZ: ProxyLocation.ResidentialNZ,
|
NZ: ProxyLocation.ResidentialNZ,
|
||||||
|
PH: ProxyLocation.ResidentialPH,
|
||||||
TR: ProxyLocation.ResidentialTR,
|
TR: ProxyLocation.ResidentialTR,
|
||||||
ZA: ProxyLocation.ResidentialZA,
|
ZA: ProxyLocation.ResidentialZA,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ ProxyLocation = typing.Union[
|
|||||||
"RESIDENTIAL_MX",
|
"RESIDENTIAL_MX",
|
||||||
"RESIDENTIAL_IT",
|
"RESIDENTIAL_IT",
|
||||||
"RESIDENTIAL_NL",
|
"RESIDENTIAL_NL",
|
||||||
|
"RESIDENTIAL_PH",
|
||||||
"RESIDENTIAL_ISP",
|
"RESIDENTIAL_ISP",
|
||||||
"NONE",
|
"NONE",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Available geotargeting options:
|
|||||||
- RESIDENTIAL_FR: France
|
- RESIDENTIAL_FR: France
|
||||||
- RESIDENTIAL_DE: Germany
|
- RESIDENTIAL_DE: Germany
|
||||||
- RESIDENTIAL_NZ: New Zealand
|
- RESIDENTIAL_NZ: New Zealand
|
||||||
|
- RESIDENTIAL_PH: Philippines
|
||||||
- RESIDENTIAL_ZA: South Africa
|
- RESIDENTIAL_ZA: South Africa
|
||||||
- RESIDENTIAL_AR: Argentina
|
- RESIDENTIAL_AR: Argentina
|
||||||
- RESIDENTIAL_AU: Australia
|
- RESIDENTIAL_AU: Australia
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ class ProxyLocation(StrEnum):
|
|||||||
RESIDENTIAL_MX = "RESIDENTIAL_MX"
|
RESIDENTIAL_MX = "RESIDENTIAL_MX"
|
||||||
RESIDENTIAL_IT = "RESIDENTIAL_IT"
|
RESIDENTIAL_IT = "RESIDENTIAL_IT"
|
||||||
RESIDENTIAL_NL = "RESIDENTIAL_NL"
|
RESIDENTIAL_NL = "RESIDENTIAL_NL"
|
||||||
|
RESIDENTIAL_PH = "RESIDENTIAL_PH"
|
||||||
RESIDENTIAL_ISP = "RESIDENTIAL_ISP"
|
RESIDENTIAL_ISP = "RESIDENTIAL_ISP"
|
||||||
NONE = "NONE"
|
NONE = "NONE"
|
||||||
|
|
||||||
@@ -95,6 +96,7 @@ class ProxyLocation(StrEnum):
|
|||||||
cls.RESIDENTIAL_MX,
|
cls.RESIDENTIAL_MX,
|
||||||
cls.RESIDENTIAL_IT,
|
cls.RESIDENTIAL_IT,
|
||||||
cls.RESIDENTIAL_NL,
|
cls.RESIDENTIAL_NL,
|
||||||
|
cls.RESIDENTIAL_PH,
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -118,6 +120,7 @@ class ProxyLocation(StrEnum):
|
|||||||
ProxyLocation.RESIDENTIAL_MX: 2000,
|
ProxyLocation.RESIDENTIAL_MX: 2000,
|
||||||
ProxyLocation.RESIDENTIAL_IT: 2000,
|
ProxyLocation.RESIDENTIAL_IT: 2000,
|
||||||
ProxyLocation.RESIDENTIAL_NL: 2000,
|
ProxyLocation.RESIDENTIAL_NL: 2000,
|
||||||
|
ProxyLocation.RESIDENTIAL_PH: 2000,
|
||||||
}
|
}
|
||||||
return counts.get(proxy_location, 10000)
|
return counts.get(proxy_location, 10000)
|
||||||
|
|
||||||
@@ -142,6 +145,7 @@ class ProxyLocation(StrEnum):
|
|||||||
ProxyLocation.RESIDENTIAL_MX: "MX",
|
ProxyLocation.RESIDENTIAL_MX: "MX",
|
||||||
ProxyLocation.RESIDENTIAL_IT: "IT",
|
ProxyLocation.RESIDENTIAL_IT: "IT",
|
||||||
ProxyLocation.RESIDENTIAL_NL: "NL",
|
ProxyLocation.RESIDENTIAL_NL: "NL",
|
||||||
|
ProxyLocation.RESIDENTIAL_PH: "PH",
|
||||||
}
|
}
|
||||||
return mapping.get(proxy_location, "US")
|
return mapping.get(proxy_location, "US")
|
||||||
|
|
||||||
@@ -165,6 +169,7 @@ SUPPORTED_GEO_COUNTRIES = frozenset(
|
|||||||
"MX",
|
"MX",
|
||||||
"NL",
|
"NL",
|
||||||
"NZ",
|
"NZ",
|
||||||
|
"PH",
|
||||||
"TR",
|
"TR",
|
||||||
"ZA",
|
"ZA",
|
||||||
}
|
}
|
||||||
@@ -307,6 +312,9 @@ def get_tzinfo_from_proxy(proxy_location: ProxyLocation) -> ZoneInfo | None:
|
|||||||
if proxy_location == ProxyLocation.RESIDENTIAL_NL:
|
if proxy_location == ProxyLocation.RESIDENTIAL_NL:
|
||||||
return ZoneInfo("Europe/Amsterdam")
|
return ZoneInfo("Europe/Amsterdam")
|
||||||
|
|
||||||
|
if proxy_location == ProxyLocation.RESIDENTIAL_PH:
|
||||||
|
return ZoneInfo("Asia/Manila")
|
||||||
|
|
||||||
if proxy_location == ProxyLocation.RESIDENTIAL_ISP:
|
if proxy_location == ProxyLocation.RESIDENTIAL_ISP:
|
||||||
return ZoneInfo("America/New_York")
|
return ZoneInfo("America/New_York")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user