MCPcopy
hub / github.com/impira/docquery / __init__

Method __init__

src/docquery/document.py:185–195  ·  view source on GitHub ↗
(self, url, **kwargs)

Source from the content-addressed store, hash-verified

183
184class WebDocument(Document):
185 def __init__(self, url, **kwargs):
186 if not (url.startswith("http://") or url.startswith("https://")):
187 url = "file://" + url
188 self.url = url
189
190 # TODO: This is a singleton, which is not thread-safe. We may want to relax this
191 # behavior to allow the user to pass in their own driver (which could either be a
192 # singleton or a custom instance).
193 self.driver = get_webdriver()
194
195 super().__init__(**kwargs)
196
197 def ensure_loaded(self):
198 self.driver.get(self.url)

Callers

nothing calls this directly

Calls 2

get_webdriverFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected