Hi, I'm a law student trying to learn Perl. Hilarious, huh?
Anyway, I'm trying to write a script to automate looking up the status of court cases online at https://www.dccourts.gov/cco/maincase.jsf. But when I run my code, it just times out and I'm not sure why. The error I get is "error: 500 SSL read timeout: at ./minimaltestcase.pl line 34"
I thought maybe I had done my form pairs improperly, but it doesn't seem like that should be the cause of this problem since with other websites it seems like I can use the POST method even with BS values like 'foo' => 'bar'. I still get something back. If I try to POST to cnn.com or paypal.com, with this script, I do get HTML printed to the console.
Anyway, here's a stripped down version of the script. If anybody can point out an error or point me in a different direction, I would much appreciate it. I did try to use LWP::Debug, but it didn't output anything.
#!/usr/bin/perl -w use warnings; use strict; use LWP::UserAgent; my $url = 'https://www.dccourts.gov/cco/maincase.jsf'; #my $url = 'https://www.paypal.com/'; my $browser = LWP::UserAgent->new; my $response = $browser->post($url, [ 'appData%3Asearchform' => 'appData%3Asearchform', 'appData%3Asearchform%3AsearchPanelCollapsedState' => 'false', 'appData%3Asearchform%3Ajspsearchpage%3AlastName' => '', 'appData%3Asearchform%3Ajspsearchpage%3AcompanyName' => '', 'appData%3Asearchform%3Ajspsearchpage%3AfirstName' => '', 'appData%3Asearchform%3Ajspsearchpage%3Aj_id_id14pc4' => '2011', 'appData%3Asearchform%3Ajspsearchpage%3AselectCaseType' => 'CF2', 'appData%3Asearchform%3Ajspsearchpage%3Aj_id_id18pc4' => '003817', 'appData%3Asearchform%3Ajspsearchpage%3AnameAttributesPanelCollapsed +State' => 'true', 'appData%3Asearchform%3Ajspsearchpage%3AsubmitSearch.x' => '25', 'appData%3Asearchform%3Ajspsearchpage%3AsubmitSearch.y' => '26', 'javax.faces.ViewState' => 'j_id1%3Aj_id2', ] ); #my $response = $browser->post($url, # [ 'foo' => 'bar', # ] #); die "$url error: ", $response->status_line unless $response->is_succes +s; print $response->content;
In reply to LWP SSL TImeouts by amsclark
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |