my $site_url = '
http://www.fourmilab.ch/cgi-bin/Yoursky';
my $url_args = "z=1&lat=35.0836&ns=North&lon=106.651&ew=West';
my $t = (get "$site_url?$url_args" or "Problem");
print "t is $t\n";
Big pimpin, Tim.
use strict;
use warnings;
use LWP::Simple;
# load the complete content of the url in question
# via LWP::Simple::get(...)
my $site_url = '
http://www.fourmilab.ch/cgi-bin/Yoursky';
my $url_args = 'z=1&lat=35.0836&ns=North&lon=106.651&ew=West';
my $t = 'Something went right!';
print "t is $t\n";
$t = (get "$site_url?$url_args" or "Problem");
print "t is $t\n";
# perl scraper3.pl
#end script show target
<td>
<input type="text" name="jd" value="2454869.37545" size="20"
How do I grab the julian date from this? Full page listing after sig.
--
larry gates
Just put in another goto, and then it'll be readable.
-- Larry Wall in <
[email protected]>
<area shape="rect" coords="470,20,545,95" alt="38.5566,213.285"
href="/cgi-bin/Y
ourtel?lat=38.5566&ns=North&lon=213.285&fov=45&z=1" />
<area shape="rect" coords="470,95,545,170" alt="40.2684,232.160"
href="/cgi-bin/
Yourtel?lat=40.2684&ns=North&lon=232.160&fov=45&z=1" />
<area shape="rect" coords="470,170,545,245" alt="35.3917,253.395"
href="/cgi-bin
/Yourtel?lat=35.3917&ns=North&lon=253.395&fov=45&z=1" />
<area shape="rect" coords="470,245,545,320" alt="23.0317,270.958"
href="/cgi-bin
/Yourtel?lat=23.0317&ns=North&lon=270.958&fov=45&z=1" />
<area shape="rect" coords="470,320,545,395" alt="5.7588,282.432"
href="/cgi-bin/
Yourtel?lat=5.7588&ns=North&lon=282.432&fov=45&z=1" />
<area shape="rect" coords="470,395,545,470" alt="-12.8447,288.823"
href="/cgi-bi
n/Yourtel?lat=12.8447&ns=South&lon=288.823&fov=45&z=1" />
<area shape="rect" coords="470,470,545,545" alt="-30.1303,291.429"
href="/cgi-bi
n/Yourtel?lat=30.1303&ns=South&lon=291.429&fov=45&z=1" />
<area shape="rect" coords="470,545,545,619" alt="-44.8154,290.856"
href="/cgi-bi
n/Yourtel?lat=44.8154&ns=South&lon=290.856&fov=45&z=1" />
<area shape="rect" coords="545,20,619,95" alt="26.4997,216.082"
href="/cgi-bin/Y
ourtel?lat=26.4997&ns=North&lon=216.082&fov=45&z=1" />
<area shape="rect" coords="545,95,619,170" alt="25.7463,229.749"
href="/cgi-bin/
Yourtel?lat=25.7463&ns=North&lon=229.749&fov=45&z=1" />
<area shape="rect" coords="545,170,619,245" alt="20.6382,244.148"
href="/cgi-bin
/Yourtel?lat=20.6382&ns=North&lon=244.148&fov=45&z=1" />
<area shape="rect" coords="545,245,619,320" alt="10.8382,256.796"
href="/cgi-bin
/Yourtel?lat=10.8382&ns=North&lon=256.796&fov=45&z=1" />
<area shape="rect" coords="545,320,619,395" alt="-2.3921,266.127"
href="/cgi-bin
/Yourtel?lat=2.3921&ns=South&lon=266.127&fov=45&z=1" />
<area shape="rect" coords="545,395,619,470" alt="-16.9564,271.889"
href="/cgi-bi
n/Yourtel?lat=16.9564&ns=South&lon=271.889&fov=45&z=1" />
<area shape="rect" coords="545,470,619,545" alt="-30.9728,274.380"
href="/cgi-bi
n/Yourtel?lat=30.9728&ns=South&lon=274.380&fov=45&z=1" />
<area shape="rect" coords="545,545,619,619" alt="-43.2794,273.825"
href="/cgi-bi
n/Yourtel?lat=43.2794&ns=South&lon=273.825&fov=45&z=1" />
</map>
<center><h1>Sky above 355'N 10639'3"W at Fri 2009 Feb 6 21:00
UTC</h1></c
enter>
<center>
<a href="/yoursky/help/sky.html"><em><font size="-1">Explain symbols in the
map.
</font></em></a><br />
<img
src="/cgi-bin/Yoursky?di=993798CF5A500FD0F5203A94A187DA027397F0AB1B0A1AEAC0
15D57B1F667D586C4450676C349655D73C3607D5C3B1C2655E87486371C1D7DB4DC369B8420AE695
6B14B20E776E571CA9B59F28B7684ADF735EEB8A" usemap="#telmap" ismap="ismap"
width="
640" height="640" border="0" alt="Map of sky above 355'N 10639'3"W
at Fri
2009 Feb 6 21:00 UTC" /><br />
<em>Click in map to aim telescope.</em>
<br /><a
href="/cgi-bin/Yourhorizon?lat=35.083600&lon=106.651000&azimuth
=0&z=2&elements="><b>View horizon at this observing site.</b></a>
</center>
<form method="post" name="request" action="/cgi-bin/Yoursky">
<center>
<input type="submit" value="Update" />
<p />
<a href="/yoursky/help/controls.html"><em>Explain controls in the following
pane
l.</em></a>
<table border="border" cellpadding="5">
<tr>
<th>
<a href="/yoursky/help/controls.html#DateTime"><b>Date and
Time</b></a>
</th>
<td>
<table>
<tr>
<td>
<input type="radio" name="date" onclick="0" checked="checked" value="0" />
<a hr
ef="/yoursky/help/controls.html#Now">Now</a>
</td>
</tr>
<tr>
<td>
<input type="radio" name="date" onclick="0" value="1" /> <a
href="/yoursky/help/
controls.html#UTC">Universal time:</a>
</td>
<td>
<input type="text" name="utc" value="2009-02-06 21:00:39" size="20"
onchange="do
cument.request.date[1].checked=true;" />
</td>
</tr>
<tr>
<td>
<input type="radio" name="date" onclick="0" value="2" /> <a
href="/yoursky/help/
controls.html#Julian">Julian day:</a>
</td>
<td>
<input type="text" name="jd" value="2454869.37545" size="20"
onchange="document.
request.date[2].checked=true;" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>
<a href="/yoursky/help/controls.html#Site">Observing Site</a>
</th>
<td>
<table cellpadding="3">
<tr>
<td>
Latitude:
</td>
<td>
<input type="text" name="lat" value="355'" size="10" />
</td>
<td>
<label><input type="radio" name="ns" checked="checked" value="North" />
North</l
abel>
<label><input type="radio" name="ns" value="South" /> South</label>
</td>
</tr>
<tr>
<td>
Longitude:
</td>
<td>
<input type="text" name="lon" value="10639'3"" size="10" />
</td>
<td>
<label><input type="radio" name="ew" value="East" /> East</label>
<label><input type="radio" name="ew" checked="checked" value="West" />
West</lab
el>
</td>
</tr>
<tr>
<td align="center">
<a href="/yoursky/cities.html"><b>Set for nearby city</b></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th><a href="/yoursky/help/controls.html#Options">Display Options</a>
</th>
<td>
<input type="checkbox" checked="checked" name="coords" /> <a
href="/yoursky/help
/controls.html#Coords">Ecliptic and equator</a>
<br />
<input type="checkbox" checked="checked" name="moonp" /> <a
href="/yoursky/help/
controls.html#Planets">Moon and planets</a>
<br />
<input type="checkbox" checked="checked" name="deep" /> <a
href="/yoursky/help/
controls.html#DeepSky">Deep sky objects of magnitude</a>
<input type="text" name="deepm" value="2.5" size="3" /> and brighter
<br />
<a href="/yoursky/help/controls.html#Constellations">Constellations:</a>
<br />
<input type="checkbox"
checked="
checked" name="consto" /> <a
href="/yoursky/help/controls.html#ConstO">Outlines<
/a>
<br />
<input type="checkbox"
checked="
checked" name="constn" /> <a
href="/yoursky/help/controls.html#ConstN">Names</a>
<label><input type="checkbox" name="consta" /> aligned with
horizon?</label>
<br />
<input type="checkbox"
checked="
checked" name="constb" /> <a
href="/yoursky/help/controls.html#ConstB">Boundarie
s</a>
<br />
<a href="/yoursky/help/controls.html#Stars">Stars:</a>
<br />
<a
href="/yoursky/help/controls.
html#StarMag">Show stars brighter than magnitude</a>
<input type="text" name="limag" value="5.5" size="3" />
<br />
<input type="checkbox"
checked="
checked" name="starn" /> <a
href="/yoursky/help/controls.html#StarName">Names fo
r magnitude</a>
<input type="text" name="starnm" value="2.0" size="3" /> and brighter
<br />
<input type="checkbox"
checked="
checked" name="starb" /> <a
href="/yoursky/help/controls.html#StarBFlam">Bayer/F
lamsteed codes</a> for mag.
<input type="text" name="starbm" value="2.5" size="3" /> and brighter
<br /><input type="checkbox" name="flip" /> <a
href="/yoursky/help/controls.html
#Invert">Invert North and South</a>
<br /><a href="/yoursky/help/controls.html#Imgsize">Image size</a>: <input
type=
"text" name="imgsize" value="640" size="6" /> pixels
<br /><a href="/yoursky/help/controls.html#Scheme">Colour scheme</a>:
<select na
me="scheme" size="1">
<option value="0" selected="selected">Colour</option>
<option value="1">Black on white background</option>
<option value="2">White on black background</option>
<option value="3">Night vision (red)</option>
</select>
</td>
</tr>
<tr>
</th>
<td align="center">
<br />
Paste <a href="/yoursky/help/elements.html">orbital elements</a> below:
<br />
<textarea name="elements" rows="1" cols="40">
</textarea><br />
</td>
</tr>
</table>
</center>
</form>
<p />
<a href="/yoursky/help/ephemeris.html"><b>Ephemeris:</b></a><center>
<table border="border" cellpadding="3">
<tr><th rowspan="2"> </th><th rowspan="2">Right<br />Ascension</th><th
rows
pan="2">Declination</th><th rowspan="2">Distance<br />(<span
title="Astronomical
units (149,597,871 km)">AU</span>)</th><th colspan="2">From 355'N
10639'3&quo
t;W:</th></tr>
<tr><th>Altitude</th><th>Azimuth</th></tr>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=0&z=1">Sun</a></th><td
align="ri
ght">21h 22m 35s</td><td align="right">−15 22.3'</td><td
align="right">0.
986</td><td align="right">34.252</td><td
align="right">29.521</td><td>Up</td></t
r>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=1&z=1">Mercury</a></th><td
align
="right">19h 40m 10s</td><td align="right">−19 45.0'</td><td
align="right
>0.863 said:
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=2&z=1">Venus</a></th><td
align="
right">0h 7m 4s</td><td align="right">+3 25.6'</td><td
align="right">0.516</td>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=3&z=1">Moon</a></th><td
align="r
ight">6h 46m 2s</td><td align="right">+25 35.2'</td><td align="right">57.0
<spa
n title="Earth radii (6378.14 km)">ER</span></td><td
align="right">−4.237<
/td><td align="right">−125.539</td><td>Set</td></tr>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=4&z=1">Mars</a></th><td
align="r
ight">20h 16m 46s</td><td align="right">−20 44.0'</td><td
align="right">2
..336</td><td align="right">21.729</td><td
align="right">41.785</td><td>Up</td></
tr>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=5&z=1">Jupiter</a></th><td
align
="right">20h 40m 29s</td><td align="right">−18 49.2'</td><td
align="right
>6.067 said:
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=6&z=1">Saturn</a></th><td
align=
"right">11h 28m 50s</td><td align="right">+5 45.5'</td><td
align="right">8.530<
/td><td align="right">−48.690</td><td
align="right">170.062</td><td>Set</t
d></tr>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=7&z=1">Uranus</a></th><td
align=
"right">23h 27m 5s</td><td align="right">−4 21.0'</td><td
align="right">2
0.923</td><td align="right">50.147</td><td
align="right">−9.577</td><td>Up
</td></tr>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=8&z=1">Neptune</a></th><td
align
="right">21h 44m 39s</td><td align="right">−13 57.0'</td><td
align="right
">31.015</td><td align="right">37.604</td><td
align="right">24.097</td><td>Up</t
d></tr>
<tr><th><a href="/cgi-bin/uncgi/Yourtel?aim=9&z=1">Pluto</a></th><td
align="
right">18h 9m 47s</td><td align="right">−17 44.2'</td><td
align="right">3
2.271</td><td align="right">2.886</td><td
align="right">65.911</td><td>Up</td></
tr>
</table>
</center>
<blockquote>
<small>Azimuth in the above table
follows the astronomical convention: zero
degrees is South with positive angles toward the
West and negative angles toward the East.</small>
</blockquote><p />
<a href="/yoursky/#Skymap"><b>Back to <em>Sky Maps</em></b></a>
<a href="/yoursky/"><b>Up to <em>Your Sky</em></b></a>
<a href="/yoursky/credits.html"><b>Credits</b></a>
<a href="/yoursky/custom.html"><b>Customise</b></a>
<a href="/yoursky/help/help.html"><b>Help</b></a>
<p />
<hr />
<address>
by <a href="/">John Walker</a>
</address>
<p />
<blockquote>
<font size="-1"><em>Images produced by Your Sky are in the public
domain and may be used in any manner without permission, restriction,
attribution, or compensation. Back links to
<a href="
http://www.fourmilab.ch/yoursky/">Your Sky</a> are
welcome.</em></font>
</blockquote>
</body>
</html>
C:\MinGW\source>