drblove27 has asked for the wisdom of the Perl Monks concerning the following question:
I am sure there is a simple command for this, but my google-fu is failing me. I would like to write a perl script that does a LWP request on a cgi page. To do so, I need the parameters, and sloshing through the HTML to figure out the parameters is hurting my head. Is there a simple command where I can feed a url to it, and it will spit out all the possible parameters that can be passed for the request?
Specifically I am looking to script this site:
http://www.bioinformatics.nl/cgi-bin/primer3plus/primer3plus.cgi
Getting the check boxes and input sequence.
Thanks in advance!
Here is the initial code, that posts the results on the page, but does not submit them:
Updated with failed code
Rather I should say that the result of this file, is the original webpage with the variables as given by the code, but the code does not press the "Pick Primers" button....
#!/usr/bin/perl use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("Mozilla 8.0"); use HTTP::Request::Common qw(POST); my $req = (POST 'http://www.bioinformatics.nl/cgi-bin/primer3plus/prim +er3plus.cgi', ["SEQUENCE" => "AATGAGTTAATAGAATCTTTACAAATAAGAATATACACTTCTGCTTAGGATGAT +AATTGGAGGCAAGTGAATCCTGAGCGTGATTTGATAATGACCTAATAATGATGGGTTTTATTTCCAGAC +TTCACTTCTAATGGTGATTATGGGAGAACTGGAGCCTTCAGAGGGTAAAATTAAGCACAGTGGAAGAAT +TTCATTCTGTTCTCAGTTTTCCTGGATTATGCCTGGCACCATTAAAGAAAATATCATC[C]GGTGTTTC +CTATGATGAATATAGATACAGAAGCGTCATCAAAGCATGCCAACTAGAAGAGGTAAGAAACTATGTGAA +AACTTTTTGATTATGCATATGAACCCTTCACACTACCCAAATTATATATTTGGCTCCATATTCAATCGG +TTAGTCTACATATATTTATGTTTCCTCTATGGGTAAGCTACTGTGAATGGATCAATTAATAAAACACAT +GACCTATGCTTTAAGAAGCTTGCAAACACATGAAA", "SCRIPT_DETECTION_PICK_LEFT" => "checked", "SCRIPT_DETECTION_PICK_RIGHT" => "checked" ]); $request = $ua->request($req); $content = $request->content; open(OUTPUT,">output_here.html"); print OUTPUT "$content"; close(OUTPUT); exit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting all the parameters of CGI request
by trwww (Priest) on Feb 02, 2010 at 19:47 UTC | |
Re: Getting all the parameters of CGI request
by jettero (Monsignor) on Feb 02, 2010 at 19:25 UTC | |
by ikegami (Patriarch) on Feb 02, 2010 at 19:30 UTC | |
Re: Getting all the parameters of CGI request
by holli (Abbot) on Feb 03, 2010 at 11:38 UTC |