Feature parity target: MetaInspector v5.17.1 (Ruby gem).
- URL resolution with redirect following (up to 5 hops)
- SSL/TLS version fallback (retry with TLSv1.2)
- Gzip decompression
- Basic authentication
- Custom User-Agent
- Link extraction (raw, internal, external, non-HTTP)
- Base href detection
- Canonical URL detection
- URL absolutification (relative to absolute)
- URL validation (with internationalized domain support)
- Pre-loaded content support (skip HTTP request via
contents:option) - XML sitemap scraping (not in MetaInspector)
- Text sitemap scraping (not in MetaInspector)
Core content extraction that MetaInspector is best known for.
Extract all <meta> tags from <head>, grouped by attribute type:
meta_tags- nested map with keys"name","http-equiv","property","charset". Values are lists (to support repeated tags like multipleog:image).meta_tag- same structure but singular values (first occurrence only).meta- flat merged map for simple access (meta["og:title"],meta["description"]).
All keys should be downcased.
title- text from<head><title>tag.best_title- smart selection in priority order:<meta name="title">valueog:titlemeta property<head><title>text<body><title>text (rare but exists)- First
<h1>text
description-<meta name="description">content.best_description- smart selection:- Meta description
og:descriptionmeta propertytwitter:descriptionmeta property- First
<p>tag with 120+ characters
author-<meta name="author">content.best_author- smart selection:- Meta author
<a rel="author">link text<address>tag texttwitter:creatormeta property
h1throughh6- lists of text content from each heading level.
charset- from<meta charset="...">or<meta http-equiv="Content-Type">.
images- list of all<img src>URLs, absolutified.images.best- best image:og:image>twitter:image> largest image.images.largest- largest image by area, filtering extreme aspect ratios (ratio between 0.1 and 10).images.owner_suggested-og:imageortwitter:image, or nil.images.favicon- from<link rel="icon">or<link rel="shortcut icon">.images.with_size- list of{url, width, height}tuples sorted by descending area. Uses HTMLwidth/heightattributes.
head_links- list of all<link>elements from<head>, each as a map of attributes with absolutifiedhref.stylesheets- filtered head links whererel="stylesheet".canonicals- filtered head links whererel="canonical"(as list, since there could be multiple).feeds-<link rel="alternate">with typeapplication/rss+xml,application/atom+xml, orapplication/json. Returns list of maps withtitle,href,type.
- Normalize URLs by default (add scheme, trailing slash, percent-encode international characters).
normalize_url: falseoption to disable.
tracked?- boolean, true if URL containsutm_source,utm_medium,utm_term,utm_content, orutm_campaignparameters.untracked_url- URL with tracking parameters stripped.
response.status- HTTP status code.response.headers- response headers as a map.content_type- MIME type from Content-Type header (without charset).
Funkspector already has urls.parsed, urls.root, etc. Expose these more explicitly:
scheme- URL scheme (http,https).host- hostname.root_url-scheme://host/.
connection_timeout- connection timeout (already havetimeout).read_timeout- receive timeout (already haverecv_timeout).retries- number of retry attempts on failure (MetaInspector defaults to 3).headers- custom HTTP request headers (generalize beyond User-Agent).allow_redirections- boolean to enable/disable redirect following (currently always enabled).max_redirects- maximum number of redirects to follow (currently hardcoded to 5, MetaInspector uses 10).allow_non_html_content- boolean, return error for non-HTML content types (default false).encoding- force document encoding for pages with invalid UTF-8.
Define specific error atoms or structs:
:timeout- request timed out.:request_error- connection failed, invalid URI, SSL error.:non_html_content- response is not HTML (whenallow_non_html_content: false).
- Persist cookies across redirect hops (MetaInspector uses a cookie jar during redirects).
to_map- returns a flat map with all extracted data (equivalent to MetaInspector'sto_hash). Useful for JSON serialization or storage.
- Optional response caching to avoid re-fetching the same URL. Consider integration with ETS or a configurable cache backend.
- Option to fetch image headers to determine dimensions (equivalent to FastImage). Lower priority since it requires additional HTTP requests per image.
These MetaInspector features don't apply or have Elixir equivalents:
- Nokogiri document access (
parsed) - Funkspector uses Floki; users can callFloki.parse_document!/1ondocument.contentsdirectly. - Faraday middleware - Funkspector uses Req (Finch/Mint) by default behind a pluggable HTTP adapter; middleware patterns differ in Elixir.
- Lazy evaluation - MetaInspector defers HTTP requests until data is accessed. Funkspector's functional API (
page_scrape/2returns everything at once) is more idiomatic in Elixir.