Charles.Forsyth20070312c webgrabe21873119 years agoHistory
141 lines · 2.6 KB · Text
RawDownload
.TH WEBGRAB 1.SH NAMEwebgrab \- fetch web page content as files.SH SYNOPSIS.B webgrab[.B -r] [.B -v] [.BI -o " stem"] [.BI -p " body"].I url.SH DESCRIPTION.I Webgrabconnects to the web server named in the.IR url .It fetches the content of the web page also determined by the.IR url ,and stores it locally in a file.If the page is written in HTML,.I webgrabreads it to build a list of sub-component pages (eg, frames) and images.It fetches those, saving the content in separate files.It adds a comment to the end of each HTML file giving the time, and the file's origin.It automatically follows redirections offered by the server..PPThe.I stemof the names of the output files is normally derived from a component of the.IR url .If the.I urlcontains a path name, the.I stemis the component of that path, less any dot-separated suffix and prefix.For example, given.IP.BR http://www.vitanuova.com/inferno/old.index.html.PPthe stem would be.BR index .If there is no path name, but the.I urlcontains a domain name, the.I stemis the penultimate component of the domain name (eg, excludingtrailing.BR .com ,and initial.BR www ,etc).For example, given.IP.B www.innerhost.vitanuova.com.PPthe stem would be.BR vitanuova .If all else fails,.I webgrabuses the.I stem.BR webgrab ..PPGiven a.IR stem ,the initial page is stored in.IB stem . suffixwhere.I suffixis the suffix (eg,.BR .html )of the name of the original page.Subordinate pages are saved in a similar way in files named.IB stem _1. suffix1,.IB stem _2. suffix2,\&... ..PPThe options are:.TP.B -rdo not fetch subcomponents (just the `raw' source of.I urlitself).TP.B -vprint a progress report.TP.B -vvprint a chatty progress report.TP.BI -o " stem"use the.I stemas given.TP.BI -p " body"Use HTTP.B POSTinstead of.BR GET ,posting.I bodyas the data.PP.I Webgrabreads theconfiguration file.B /services/webget/config(if it exists),to look for the address of an optional HTTP proxy(in the.L httpproxyentry), and list of domains for which a proxy should not be used(in the.B noproxyor.B noproxydomsentry). If symbolic network and service names might be involved, theconnection server.B lib/csneeds to be already running..SH FILES.B /services/webget/config.SH SOURCE.B /appl/cmd/webgrab.b.SH BUGSIt should read the proxy name from the.IR charon (1)configuration file and not the.I webgetconfiguration file..brIt cannot do `secure' transfers.RB ( https )..brIts HTML parsing is naive, but on the other hand, it is less likely to trip over HTML novelties..SH "SEE ALSO".IR cs (8)