MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / request_timeout

Method request_timeout

Scripts/Network Tools/Store Scrapper.py:1033–1044  ·  view source on GitHub ↗
(self, attempt: int = 1, kind: str = "html")

Source from the content-addressed store, hash-verified

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))

Callers 2

fetchMethod · 0.95
download_imageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected