ASF Bugzilla – View All Attachments for
Bug 8901
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Attachment #1810
scrape through proxy server/port/name/pass
text/plain
2002-05-08 08:07:19 UTC
2.34 KB
no flags
Details
You cannot view the attachment on this page because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Attachment #10603
Output of the example running on Tomcat 4.1.30 and latest scrape from CVS
text/html
2004-02-28 03:09:41 UTC
3.29 KB
no flags
Details
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html><head><title>Example JSP using scrape taglib</title></head> <body bgcolor="#ffffff"> <h3 align="center">Weather Quote</h3><br><br> <p><b>Example #1</b><br> The example below scrapes the page for the <a href="http://weather.noaa.gov/cgi-bin/fmtbltn.pl?file=forecasts/city/mo/columbia.txt">Columbia, Missouri weather forecast</a> from the <a href="http://weather.noaa.gov/">National Weather Service</a> site. In this scrape, the <b>anchors</b> attribute was set to true, and the <b>begin</b> and <b>end</b> anchor attributes were set to the <PRE> and </PRE> tags that surround the forecast. </p> <pre><font size="-1" color="#a9a9a9">FPUS43 KLSX 272043</font> <b><font size="+1" color="#483d8b">City Forecast for Columbia, MO Issued Friday afternoon - Feb 27, 2004 </font></b> <b><font size="+1" color="#800000">Friday night</font></b> Low 35, 0% chance of precipitation. <b><font size="+1" color="#800000">Saturday</font></b> Partly cloudy, high 62, 5% chance of precipitation. <b><font size="+1" color="#800000">Saturday night</font></b> Low 42, 5% chance of precipitation. <b><font size="+1" color="#800000">Sunday</font></b> Mostly cloudy, high 60. <b><font size="+1" color="#800000">Sunday night</font></b> Low 45. </pre> <hr> <p><b>Example #2</b><br> This example scrapes the same page as the first example and uses the same anchors, but in this case the <b>anchors</b> attribute was set to false so that the anchors are stripped from the scrape result. Browsers typically treat text within <PRE> tags with a monospaced font and line breaks in the HTML are retained. Since the <PRE> and </PRE> tags are the anchors and they are removed from the scrape result, the formatting is noticeably different. </p> <font size="-1" color="#a9a9a9">FPUS43 KLSX 272043</font> <b><font size="+1" color="#483d8b">City Forecast for Columbia, MO Issued Friday afternoon - Feb 27, 2004 </font></b> <b><font size="+1" color="#800000">Friday night</font></b> Low 35, 0% chance of precipitation. <b><font size="+1" color="#800000">Saturday</font></b> Partly cloudy, high 62, 5% chance of precipitation. <b><font size="+1" color="#800000">Saturday night</font></b> Low 42, 5% chance of precipitation. <b><font size="+1" color="#800000">Sunday</font></b> Mostly cloudy, high 60. <b><font size="+1" color="#800000">Sunday night</font></b> Low 45. <hr> <p><b>Example #3</b><br> This example scrapes the same page as the first two examples and uses the same anchors, but in this case the <b>anchors</b> attribute was set to false and the <b>strip</b> attribute was set to true so that the anchors and HTML tags are stripped from the scrape result. </p> FPUS43 KLSX 272043 City Forecast for Columbia, MO Issued Friday afternoon - Feb 27, 2004 Friday night Low 35, 0% chance of precipitation. Saturday Partly cloudy, high 62, 5% chance of precipitation. Saturday night Low 42, 5% chance of precipitation. Sunday Mostly cloudy, high 60. Sunday night Low 45. </body></html>