Helper function to split and parse the proxy string into its components. Args: split_proxy (List[str]): A list containing the components of the proxy string.
(self, split_proxy: List[str])
| 72 | await self._phttpx.aclose() |
| 73 | |
| 74 | def split_helper(self, split_proxy: List[str]) -> None: |
| 75 | """ |
| 76 | Helper function to split and parse the proxy string into its components. |
| 77 | |
| 78 | Args: |
| 79 | split_proxy (List[str]): A list containing the components of the proxy string. |
| 80 | """ |
| 81 | if not any([_.isdigit() for _ in split_proxy]): |
| 82 | raise SplitError("No ProxyPort could be detected") |
| 83 | if split_proxy[1].isdigit(): |
| 84 | self.ip, self.port, self.username, self.password = split_proxy |
| 85 | elif split_proxy[3].isdigit(): |
| 86 | self.username, self.password, self.ip, self.port = split_proxy |
| 87 | else: |
| 88 | raise SplitError(f"Proxy Format ({self.proxy}) isnt supported") |
| 89 | |
| 90 | def split_proxy(self) -> None: |
| 91 | split_proxy = self.proxy.split(":") |