⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spanish.cf

📁 harvest是一个下载html网页得机器人
💻 CF
字号:
# $Id: spanish.cf,v 1.0 2002/11/28 by Harald Weinreich and Javi Masa## Definitions for '{nph-}search.cgi' configuration.## A hash (#) in the first column denotes a comment and is not processed# even inside a definition.  Hashes not in the first column are left as-is.## Variable substitution occurs on these definitions.  If you want# a dollar-sign ($) to occur in the output, escape it with backslash (\).# Other metacharacters (quotes, asterisks, etc) probably don't need to be# escaped.  Printf-like special characters are allowed: \n \t \r etc.## The ending newline is chopped off from each definiton.  So##   <FooBar>#   abcxyz#   </FooBar>## becomes "abcxyz".  You may have blank lines in between the beginning# and ending tags, or use the newline character \n.### CGI defaults.<Default>charset       : ISO-8859-1</Default>############################################################################### RESULT SECTION## The output of '{nph-}search.cgi' consists of the following tags:##    ResultHeader#    CreateNavBars#    ResultSetBegin#    ( Errors from 'broker' )#    foreach object {#        PrintObject#    }#    ResultSetEnd#    EndBrokerResults#    ( TruncateWarning )#    ResultTrailer################################################################################# First output for the HTML containing the results.  Should probably include# <TITLE> tag and the user query.#<ResultHeader><HEAD><TITLE>Resultados de la b鷖queda de: $html_query</TITLE><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style><!--dt { margin-left:1px; }dd { margin-left:40px; }// --></style></HEAD><BODY bgcolor=white><H2>Resultados de la b鷖queda: <font color="#800000">$html_query</font></H2>$filterhint</ResultHeader># Calculations to obtain $navigationBar# Original code by Javi Masa <javi.masa@rediris.es>#<CreateNavBars>if ($totalPages > 0){  # elements before and after current page in navigation bar  local($navPart) = 5;  $prevPage = "";  $prevPage = "\n\n<a href=\"".&create_link($page-1)."\">&lt;= Anterior</a> &middot;" if ($page > 1);  $nextPage = "";  $nextPage = "&middot; <a class=\"navBar\" href=\"".&create_link($page+1)."\">Siguiente =&gt;</a>" if ($page < $totalPages);  $pageList = "";  local($startP) = ($page <= $navPart) ? 1 : $page - $navPart;  for ($i = $startP; $i < $page; $i++)  { $pageList .= "<a href=\"".&create_link($i)."\">$i</a>\n"; }  $pageList .= "<b><font color=\"#800000\" size=+1>$page</font></b>\n";  local($endP) = ($page + $navPart >= $totalPages) ? $totalPages : $page + $navPart;  for ($i = $page+1; $i <= $endP; $i++)  { $pageList .= "\n<a href=\"".&create_link($i)."\">$i</a>\n"; }  $navigationBar = "\n$prevPage\n $pageList\n $nextPage" if ($totalPages > 1);}</CreateNavBars># Output just before beginning the loop over objects returned by the broker.#<ResultSetBegin><form method="GET" action="/Harvest/cgi-bin/search.cgi">\n<table border="0" cellspacing=0 cellpadding=4 width="100%"><tr bgcolor="#E0E0E0">  <td align=left width="20%" nowrap>    $totnumber resultados  </td>  <td align=center width="60%">    $navigationBar  </td>  <td align=right width="20%">    Paje: $page/$totalPages  </td></tr><tr><td align=middle colspan=3> <input type=hidden name=broker value="$broker"> <input type=hidden name=hp_url value="$hp_url"> <input type=hidden name=caseflag value="$RQ{'caseflag'}"> <input type=hidden name=wordflag value="$RQ{'wordflag'}"># <input type=hidden name=opaqueflag value="$RQ{'opaqueflag'}"># <input type=hidden name=descflag value="$RQ{'descflag'}"># <input type=hidden name=maxresultflag value="$RQ{'maxresultflag'}"># <input type=hidden name=maxobjflag value="$RQ{'maxobjflag'}"># <input type=hidden name=maxlineflag value="$RQ{'maxlineflag'}"> <input type=hidden name=weightflag value="$RQ{'weightflag'}"> <input type=hidden name=attribute value="@atts"><a href="$hp_url">B鷖queda:</a> <input type=text name=query value='$RQ{'query'}'> <input type=submit></td></tr></form></table><DL>\n</ResultSetBegin># output just after ending the loop over objects returned by the broker#<ResultSetEnd></DL><form method="GET" action="/Harvest/cgi-bin/search.cgi"><table border="0" width="100%" bgcolor="#E0E0E0"><tr> <td align="left" width="20%" nowrap>  <input type=hidden name=broker value="$broker">  <input type=hidden name=hp_url value="$hp_url">  <input type=hidden name=caseflag value="$RQ{'caseflag'}">  <input type=hidden name=wordflag value="$RQ{'wordflag'}">#  <input type=hidden name=opaqueflag value="$RQ{'opaqueflag'}">#  <input type=hidden name=descflag value="$RQ{'descflag'}">#  <input type=hidden name=maxresultflag value="$RQ{'maxresultflag'}">#  <input type=hidden name=maxobjflag value="$RQ{'maxobjflag'}">#  <input type=hidden name=maxlineflag value="$RQ{'maxlineflag'}">  <input type=hidden name=weightflag value="$RQ{'weightflag'}">  <input type=hidden name=attribute value="@atts">  <a href="$hp_url">B鷖queda:</a> <input type=text name=query size=15 value='$RQ{'query'}'> <input type=submit value="Go"> </td> <td align="center" width="60%">  $navigationBar </td>  <td align="right" width="20%"><a href="$CFG{'HarvestUrl'}"><img alt="Powered by Harvest" border="0" src="$harvestIcon"></a></td></table></form></ResultSetEnd># PER-OBJECT DEFINITIONS# ======================## VARIABLES:##    $url         Object url: http://www.cia.gov:3333/Spies/KGB/secret.html#    $A           URL Access: http#    $H           URL Host  : www.cia.gov:3333#    $P           URL Path  : /Spies/KGB/secret.html#    $D           URL Dir   : /Spies/KGB/#    $F           URL File  : secret.html#    $cs_url      URL to the SOIF object in the broker databse#    $cs_[ahp]    elements of $cs_url as above with $url#    $desc        Description attribute of the matched object#    $opaque      A matched line (or all matched lines in obj-at-a-time mode)#    $usermsg     A user message#    $attributes  Requested attributes#    $objectType  Type of object if not HTML#    $objectSize  Size of object#    $objectDate  Last modification date of object#<PrintObject><DT>$objectnum <A HREF="$url">$description</A>&nbsp;&nbsp;<FONT size=-1 color=#606060>$objectType</FONT>&nbsp;&nbsp;<FONT size=-1 color=#606060>$objectSize</FONT>&nbsp;$objectWeight<DD>$attributes<DD>$opaque<?$cs_urlX><DD><B>Datos del 韓dice:</B><A HREF="$cs_a://$cs_h/Harvest/cgi-bin/displaySOIF.cgi?object=$cs_p&query=$html_query">formateado</A>&middot;<A HREF="$cs_a://$cs_h/Harvest/cgi-bin/displaySOIF.cgi?object=$cs_p&style=plain">plano</A></?$cs_urlX><DD><FONT size=-1 color=#006000>$url</font>&nbsp;<FONT size=-1 color=#606060>$objectUpdate</FONT><BR><BR></PrintObject># PerObjectFunction is eval'd before every object is printed out.#<PerObjectFunction># init output variables$objectType="";$objectSize="";$objectUpdate="";$objectWeight = "";$opaquePerObjectCount = 1;$lastOpaqueObject     = "";# create description$description = "<I>Fichero:</I>&nbsp;&nbsp;$F";$description = $desc if (length($desc) > 5);# highlight search words.for ($i=0; $i<=$#searchwords; $i++) {   s/(\b$searchwords[$i]\b)/<b>$1<\/b>/ig;}# Create the HTML code to print the weight ballsif ($maxWeight > 0 && $weightflag){  $nWeight = int($weight * 5 / $maxWeight);  for ($idxWeight = 1; $idxWeight <= $nWeight; $idxWeight++)       { $objectWeight .= "<img alt=\"*\" src=\"$weightIcon\">"; }#  $objectWeight = "<font size=-1 color=#606060>".int($weight * 100 / $maxWeight)."%</font>";}# format matched linesif ($opaque ne '') {   $opaque = "<strong>coincidencias:</strong> $opaque..."}</PerObjectFunction># PerAttributeFunction is eval'd before the Attributes are printed out.#<PerAttributeFunction># Remove all empty lines$val =~ s/^(\s*)//mg;# Now prepare the object's type and size to display at the description.if ($att eq "type") {                           ## show file type   $objectType = "[".$val."]" if !($val =~ /HTML|HTTP-Query/);   $att="";                                     # avoid <FormatAttribute>} elsif ($att eq "file-size") {                 ## calculate file size   $val = int($val/1024);   $objectSize = $val." KByte" if ($val > 150); # more than 150 KByte   $val = int($val/10.24);   $objectSize = ($val/100)." MByte" if ($val > 100); # more than one meg   $att="";} elsif ($att eq "last-modification-time") {    ## calculate last modification date   local(@date,@months,$month,$minute,$year);   @date = localtime($val);   @months = ('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');   $month = $months[$date[4]];   $minute = $date[1];   $minute = "0$minute" if $minute < 10;   $year = $date[5]+1900;   $objectUpdate = "$date[3]-$month-$year"; # $date[2]:$minute";   $att="";} else {                                        ## other attributes   # insert commas to separate headings   $val =~ s/\n(.)/, $1/mg;   # If more than 120 Characters, display only the first 120 plus "..."   $val =~ s/^((.|\n){120})(.|\n)*/$1.../;   #highlight search words.   for ($i=0; $i<=$#searchwords; $i++) {      $val =~ s/(\b$searchwords[$i]\b)/<font color=#800000>$1<\/font>/ig;   }   $att =~ s/headings/t韙ulos/;}</PerAttributeFunction># ======================================================================# ERROR, STATUS and WARNING functions# ======================================================================# The message printed to the browser and logged to the HTTP server log# when the processes is killed.  If the Timeout time is reached, the# process dies from SIGALRM.  The short name of the offending signal# is placed in $sig.#<sigdie>Matado por SIG$sig...\n</sigdie># A warning message printed only when the broker might have truncated# the result set.  Only printed if the number of matched lines equals# the 'maxresultflag' or the number of returned objects equals the# 'maxobjflag' value of the query.html form.#<TruncateWarning><P><STRONG>AVISO: Los resultados han sido cortados ya que sehan sobrepasado las $nopaquelines l韓eas de coincidencia. Seencontraron $nreturned objetos.</STRONG><P>\n</TruncateWarning># A warning message printed only when the broker returned 0 results.#<EmptySetWarning><h2>No se encontr

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -