Skip to content

About

Fetch web content into a named local cache for multiple reuse. Convert HTML to Markdown by default, refresh expired entries, and maintain a JSON manifest.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

fetch-cache-web

Save a web page locally and retrieve it later by name. HTML is converted to Markdown by default.

  • Fetch a page from its web URL and give it a name to reuse later.
  • Keep the original content and skip Markdown conversion with --skip-markdownify.
  • Check saved entries with show or refresh a page with --refetch.

Usage

Install uv. The script specifies its own dependencies and requires Python 3.12 or later.

uv run fetch_cache_web.py get https://example.com --name example

get prints the path to the saved file. Use the same name to get that path again. After 30 days, get fetches the URL again by default.

uv run fetch_cache_web.py get example
uv run fetch_cache_web.py show example
uv run fetch_cache_web.py show

Fetch again immediately or change when the cached page expires.

uv run fetch_cache_web.py get example --refetch
uv run fetch_cache_web.py get example --expiry-days 7

Save the original content in a separate cache.

uv run fetch_cache_web.py get https://example.com --name example --skip-markdownify --cache-dir .cache/raw
uv run fetch_cache_web.py show --cache-dir .cache/raw

Run uv run fetch_cache_web.py get --help or uv run fetch_cache_web.py show --help for more options.

Agent skill

Copy the fetch-cache-web folder into your agent's skills directory.

Project source on GitHub

About

Fetch web content into a named local cache for multiple reuse. Convert HTML to Markdown by default, refresh expired entries, and maintain a JSON manifest.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages