(cls, url)
| 76 | |
| 77 | @classmethod |
| 78 | def _parse_url(cls, url): |
| 79 | _, host, port, _, password, _, _ = _parse_url(url) |
| 80 | |
| 81 | if not host or not password: |
| 82 | raise ImproperlyConfigured("Invalid URL") |
| 83 | |
| 84 | if not port: |
| 85 | port = 443 |
| 86 | |
| 87 | scheme = "https" if port == 443 else "http" |
| 88 | endpoint = f"{scheme}://{host}:{port}" |
| 89 | return endpoint, password |
| 90 | |
| 91 | @cached_property |
| 92 | def _client(self): |