(self, url, **kwargs)
| 183 | |
| 184 | class 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) |
nothing calls this directly
no test coverage detected