MTScraper

v2.1.1
io.github.mazprotech/mtscraper Checked 18 hours ago Published 16 days ago

Free local crawler: any site, JavaScript pages and linked PDFs, into clean text.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

crawl Crawl a website into clean text

Crawls a site from the start URL, following internal links (same domain) and linked PDFs, and returns one record per page: url, title, view, type (html|pdf), text, tables. Obeys robots.txt. Results are also written to a JSONL file whose path is returned.

ParameterTypeDescription
url *stringStart URL
clickstringCSS selector of tabs/buttons to click on single-page apps, saving every view
followstringOnly follow links whose URL contains this text, e.g. /docs/
formatstringtext (default) or markdown, which keeps headings, lists, links and tables
jsbooleanRender pages in headless Chromium for JavaScript sites (slower)
max_pagesintegerStop after this many pages (0 = no limit)
pdfbooleanAlso download linked PDFs and extract their text and tables

read Read one web page

Fetches one page (or PDF) and returns its clean main content in the reply, as Markdown by default. Nothing is saved to a file. Obeys robots.txt.

ParameterTypeDescription
url *stringPage URL
formatstringmarkdown (default) or text
jsbooleanRender the page in headless Chromium first, for JavaScript sites (slower)

map List a site's pages

Lists the pages of a site without downloading them: from its sitemap, or else from the links on the start page. Same site only; pages robots.txt blocks are left out.

ParameterTypeDescription
url *stringStart URL of the site
max_pagesintegerList at most this many pages (0 = no limit)