SCRAPER(1)
π SCRAPER(1) β like, the scraper manual page, bestie β¨
okay so real quick: this is scraper from section 1 of the manual (general commands, the iconic ones), and honestly? she's giving main character energy for anyone who's ever needed to poke at some HTML. let's get into it π
β¨ NAME β¨
scraper β HTML querying with CSS selectors. literally that's her whole thing, no cap π
πΈ SYNOPSIS πΈ
scraper [-HIcint] [-a attr] [-d | -f] selector [file ...]
like, you give her a selector and optionally some file ...s and she does the rest. slay π¦
π DESCRIPTION π
so the scraper utility parses HTML and then outputs the elements that match your CSS selectors. that's it, that's the vibe. π₯
the arguments are as follows (pay attention bestie, they're all important):
-H,--htmlβ outputs the HTML of the matching elements. this one is the default btw, she's the baseline π-I,--inner-htmlβ outputs the inner HTML of the matching elements. yes there's a difference and yes it matters π-a attr,--attr attrβ outputs the value of the attributeattrof the matching elements. very specific, very demure π-c,--classesβ outputs the classes of the matching elements. get those class names, periodt β¨-d,--documentβ parses the input as HTML documents. this is the default too, so she's already doing it unless you say otherwise π-f,--fragmentβ parses the input as HTML fragments. for the lil pieces, iykyk π§-i,--idβ outputs the IDs of the matching elements. id supremacy fr fr π-n,--nameβ outputs the names of the matching elements. name 'em and claim 'em π¦-t,--textβ outputs the text of the matching elements. just the words, nothing extra π
π EXIT STATUS π
the scraper utility exits 0 on success, 1 if no elements match, and >1 if an error occurs.
so like, if she comes back with a 1 it's not a crash, it's just "bestie i found nothing" π and anything above 1? that's a real error, be concerned π
π«Ά AUTHORS π«Ά
- June McEnroe
<june@causal.agency> - Vivek Kushwaha
<yoursvivek@gmail.com>
the scraper utility relies heavily on code from the Servo project: https://servo.org β iconic behavior honestly, standing on the shoulders of legends π
and that's the page!! π this edition shipped with Debian, dated October 29, 2018 β vintage but still serving π
stay nosy, stay querying, mwah π
π¦ where this page comes from
- nixos 26.05: scraper 0.27.0
- nixpkgs unstable: scraper 0.29.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms