(self, attempt: int = 1, kind: str = "html")
| 1031 | self.stats[key] = int(self.stats.get(key, 0)) + amount |
| 1032 | |
| 1033 | def detect_input_mode(self, url: str) -> str: |
| 1034 | url = canonicalize_url(url) |
| 1035 | if is_likely_product_url(url): |
| 1036 | return "product" |
| 1037 | if is_likely_category_url(url): |
| 1038 | return "category" |
| 1039 | parts = [p for p in strip_locale_parts(path_parts(url)) if p] |
| 1040 | if len(parts) <= 1: |
| 1041 | return "site" |
| 1042 | return "category" |
| 1043 | |
| 1044 | def request_timeout(self, attempt: int = 1, kind: str = "html") -> Tuple[int, int]: |
| 1045 | connect_base = int(self.config.get("connect_timeout", DEFAULT_CONNECT_TIMEOUT)) |
| 1046 | read_base = int(self.config.get("read_timeout", self.config.get("timeout", DEFAULT_READ_TIMEOUT))) |
| 1047 | step = int(self.config.get("timeout_step", DEFAULT_TIMEOUT_STEP)) |
no outgoing calls
no test coverage detected