MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / fetch_and_save

Function fetch_and_save

scripts/update_cdp.py:45–50  ·  view source on GitHub ↗
(url, file_path)

Source from the content-addressed store, hash-verified

43
44
45def fetch_and_save(url, file_path):
46 response = http.request("GET", url)
47 if response.status != 200:
48 raise ValueError(f"Fetch failed (HTTP {response.status}): {url}")
49 with open(file_path, "wb") as file:
50 file.write(response.data)
51
52
53def new_chrome(chrome_milestone):

Callers 1

add_pdlsFunction · 0.85

Calls 2

requestMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected