获得代理参数,默认http代理 get proxy params, use http proxy for default
(self)
| 604 | self.proxytype = proxytype |
| 605 | |
| 606 | def proxies(self): |
| 607 | """ |
| 608 | 获得代理参数,默认http代理 |
| 609 | get proxy params, use http proxy for default |
| 610 | """ |
| 611 | if self.address: |
| 612 | if self.proxytype in self.SUPPORT_PROXY_TYPE: |
| 613 | proxies = {"http": self.proxytype + "://" + self.address, |
| 614 | "https": self.proxytype + "://" + self.address} |
| 615 | else: |
| 616 | proxies = {"http": "http://" + self.address, "https": "https://" + self.address} |
| 617 | else: |
| 618 | proxies = {} |
| 619 | |
| 620 | return proxies |
| 621 | |
| 622 | |
| 623 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected