(url: string, options: CrawlOptions)
| 167 | |
| 168 | @measure |
| 169 | private static async crawl(url: string, options: CrawlOptions) { |
| 170 | const { output, selectors } = options; |
| 171 | const exists = await FileStore.has({ dir: output }); |
| 172 | if (exists) { |
| 173 | return; |
| 174 | } |
| 175 | |
| 176 | const { documents } = await WebCrawler.crawl({ |
| 177 | url, |
| 178 | selectors, |
| 179 | }); |
| 180 | |
| 181 | await FileStore.write({ dir: output, files: documents }); |
| 182 | } |
| 183 | |
| 184 | @measure |
| 185 | private static async storeFunction({ |
no test coverage detected