wwwget(1)

πŸ“¦ version 4.07, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

wwwget β€” it's literally a www request on HTTP ✨ from the General Commands Manual, section 1, (Rev. February 2007). She's an old queen but she still eats πŸ’…


✨ SYNTAX ✨

wwwget [-v] [-s] [-m...] [-abs] [-post| -head|-get|-redirect] [-c
name=value] [-p#
prompt] [-q] [-D domain] [-F from ] [-U username] [-P password] [-i
input_file] [-o output_file] [-r range] [ -to secs] [URL|host[:port]]
[query_argument]...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, here's the vibe: wwwget gets one or several HTTP document(s) and drops them directly on the standard output. No cap. She avoids the usage of Netscape or similar browser entirely β€” browsers could never, honestly πŸ™ˆ

And when you only hand her the host as a command-line argument? Then the documents relative to that host are assumed to be chilling in the standard input, just waiting for their moment πŸ’«


πŸ’… OPTIONS πŸ’…

  • -v β€” verbose mode, bestie! She'll display number of bytes transferred so you can watch the numbers go brrr ✨
  • -m[version] β€” emulates Mozilla (she inserts the User-Agent, etc. into the message); the default version is 3. main character cosplay πŸŽ€
  • -s β€” silent mode: the HTTP header is stripped. By default that header (the one containing the status, Content-Type, etc.), which is terminated by a blank line, gets displayed on the standard error. so -s is your "girl, no commentary please" flag πŸ’€
  • -post β€” get the document with the POST method. The default is the GET method.
  • -head β€” get the document with the HEAD method (so like, only the header). The default is the GET method.
  • -get β€” use the default GET method to retrieve the document.
  • -redirect β€” generates a Redirect block instead of querying the remote site. Essentially useful when you pair it with the -q option, iykyk ✨
  • -abs β€” translates relative anchors into absolute ones, which gives you useable HTML files. This operation is similar to the wwwabs(1) program πŸ‘‘
  • -c cookie β€” to forward a cookie (in the form name =value) πŸͺ
  • -p[n] prompt β€” to define the prompt text β€” a text which indicates to stop the data. A number n may be attached to the -p argument to indicate to stop at the nth occurrence of the prompt.
  • -q β€” to indicate a query, i.e. the URL indicates only a cgi script, and arguments to that script are given as the query_argument supplementary arguments. When no supplementary query_argument appears on the command line, the arguments are assumed to be in the input_file or the standard input, one line per argument; in this input, lines starting by a blank (or a tab) are considered as a continuation of the previous line. An example is given below πŸ’–
  • -F from β€” specifies the From: string in the HTTP protocol, typically used to propagate e-mails. This directive is used to propagate the origin of Aladin calls to VizieR πŸ›°οΈ
  • -D domain β€” specifies the domain name which is required in the WWW-Authenticate context; the domain name is specified in the WWW-Authenticate: answer from the HTTP server πŸ”
  • -U username β€” specifies the username for documents requiring an Authorization.
  • -P password β€” specifies the password for documents requiring an Authorization. shhh 🀫
  • -i input_file β€” specifies the input_file, useful in the -query mode. Default input file is stdin.
  • -o output_file β€” specifies the output_file, containing the results. Default output file is stdout.
  • -r range_of_bytes β€” specifies a starting/ending point of the document to get βœ‚οΈ
  • -to secs β€” specifies a time-out in seconds between the reception of 2 packets; the default is 1200 (20min) ⏳
  • URL|host[:port] β€” okay so this one has three whole moods, pay attention bestie:
    • => When a full URL is specified, the document is located and displayed.
    • => if only a hostname is supplied, document names are assumed to be specified in the standard input; documents specified in the standard input without hostname are then assumed to be relative to host.
    • => when no document or host is specified, the standard input is assumed to contain fully qualified URLs.

🫢 RETURNED STATUS 🫢

  • wwwget returns 0 in case of success. we love a happy ending ✨
  • The code 1 is returned when there are invalid arguments, or when the host could not be contacted.
  • The code 2 is returned when the contacted server indicates an error (HTTP error code above 400).

🌈 HTTP STATUSES 🌈

(from http://www.faqs.org/rfcs/rfc2616.html) β€” a whole lore drop, bestie, let's go πŸ’«

  1. Informational 1xx
    • => 100 Continue
    • => 101 Switching Protocols
  2. Successful 2xx
    • => 200 OK
    • => 201 Created
    • => 202 Accepted
    • => 203 Non-Authoritative Information
    • => 204 No Content
    • => 205 Reset Content
    • => 206 Partial Content
  3. Redirection 3xx
    • => 300 Multiple Choices
    • => 301 Moved Permanently
    • => 302 Found
    • => 303 See Other
    • => 304 Not Modified
    • => 305 Use Proxy
    • => 306 (Unused)
    • => 307 Temporary Redirect
  4. Client Error 4xx
    • => 400 Bad Request
    • => 401 Unauthorized
    • => 402 Payment Required
    • => 403 Forbidden
    • => 404 Not Found
    • => 405 Method Not Allowed
    • => 406 Not Acceptable
    • => 407 Proxy Authentication Required
    • => 408 Request Timeout
    • => 409 Conflict
    • => 410 Gone
    • => 411 Length Required
    • => 412 Precondition Failed
    • => 413 Request Entity Too Large
    • => 414 Request-URI Too Long
    • => 415 Unsupported Media Type
    • => 416 Requested Range Not Satisfiable
    • => 417 Expectation Failed
  5. Server Error 5xx
    • => 500 Internal Server Error
    • => 501 Not Implemented
    • => 502 Bad Gateway
    • => 503 Service Unavailable
    • => 504 Gateway Timeout
    • => 505 HTTP Version Not Supported

πŸŽ€ EXAMPLES πŸŽ€

  1. Get the result of a query into a reuseable file:
wwwget -strip -abs http://vizier/cgi-bin?-source=HIP > HIP.html
  1. Query vizier with arguments specified in the standard input:
wwwget -strip  -q http://vizier.u-strasbg.fr/cgi-bin/asu-xml <<
====ENDofQuery
-source=I/239/hip_main
HIP=1..10
-out.all
====ENDofQuery

which could also be called as:

wwwget -q http://vizier.u-strasbg.fr/cgi-bin/asu-xml
-source=I/239/hip_main HIP=1..10 -out.all

or as

wwwget -q http://vizier.u-strasbg.fr/cgi-bin/asu-
xml\?-source=I/239/hip_main HIP=1..10 -out.all

πŸ”₯ SEE ALSO πŸ”₯

netscape(1) wwwabs(1)


and that's the whole page bestie 🫢 this was the General Commands Manual entry wwwget(1), (Rev. February 2007) β€” go forth and fetch, you absolute icon πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from