MCPcopy
hub / github.com/NitroRCr/AIaW / crawl

Function crawl

src/utils/web-search-plugin.ts:109–119  ·  view source on GitHub ↗
(url, settings)

Source from the content-addressed store, hash-verified

107}
108
109async function crawl(url, settings) {
110 const response = await fetch(new URL(`/${url}`, JinaReaderURL), {
111 headers: settings.jinaApiKey ? {
112 Authorization: `Bearer ${settings.jinaApiKey}`
113 } : undefined
114 })
115 if (!response.ok) {
116 throw new Error(`Failed to crawl: ${response.statusText}`)
117 }
118 return await response.text()
119}
120
121const pluginId = 'aiaw-web'
122

Callers 1

executeFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected