A
Alythh
I fear I don't understand correctly the method query_form in URI::URL
(and perldoc didnt help so much).
I need to access a page that has to be obtained by GET method in a
form.
I found that simply I can use
my $url = url($address);
$url->query_form(key1 => value1, ...);
$content = get($url);
but...
1st, I didnt understand how to point query_form to the right form if
the page contains many: by which keyword do I identify it?
2nd, I don't understand the values to insert in query_form
Practically, I'm trying to automate the download of the current issue
of PRL at http://prl.aps.org/, where I have:
<b>Recent and Future Issues</b><form method="GET"
action="http://link.aps.org/newfind/">
<input type="hidden" name="jrnl" value="prl">
<p><select name="issue" size="1">
<option value="v91i18"selected>Vol. 91, No. 18 (25-31 Oct 2003) open
</option>
<option value="accepted">Accepted Papers</option>
.......
</select> <input type="submit" value="Go">
</form>
concerning the <option value="...">, I don't know in advance the
value, only that I need the DEFAULT one (I believe that's the one
identified by "selected")
I know it's a mess, but can some good soul help me on this?
Thanks!
Alessandro Magni
(and perldoc didnt help so much).
I need to access a page that has to be obtained by GET method in a
form.
I found that simply I can use
my $url = url($address);
$url->query_form(key1 => value1, ...);
$content = get($url);
but...
1st, I didnt understand how to point query_form to the right form if
the page contains many: by which keyword do I identify it?
2nd, I don't understand the values to insert in query_form
Practically, I'm trying to automate the download of the current issue
of PRL at http://prl.aps.org/, where I have:
<b>Recent and Future Issues</b><form method="GET"
action="http://link.aps.org/newfind/">
<input type="hidden" name="jrnl" value="prl">
<p><select name="issue" size="1">
<option value="v91i18"selected>Vol. 91, No. 18 (25-31 Oct 2003) open
</option>
<option value="accepted">Accepted Papers</option>
.......
</select> <input type="submit" value="Go">
</form>
concerning the <option value="...">, I don't know in advance the
value, only that I need the DEFAULT one (I believe that's the one
identified by "selected")
I know it's a mess, but can some good soul help me on this?
Thanks!
Alessandro Magni