Function extractFavicon

  • Gets favicon for any URL by parsing the HTML and looking for <link rel="icon"> tags and validates domain.com/favicon.ico by checking if for valid response.

    Parameters

    • url: string
    • Optionaloptions: any = {}

    Returns Promise<string>

    Favicon URL or null if not found

    ai-research-agent (2024)

    const favicons = await extractFavicon('https://github.com/')