作者aviatear (在梅边)
看板Perl
标题[问题] 一直出现 500 internal server error
时间Tue Oct 13 17:00:58 2009
同一个程式 为什麽执行这个网页(
http://phobius.binf.ku.dk/index.html) 就成功
但是 执行这各网页(
http://psort.ims.u-tokyo.ac.jp/form2.html) 却一直出现 500 internal server error??
执行的query(keywords)都是:
>:144448 MLRNNKTIIIKYFLNLINGAFLVLGLLFMGFGAWLLLDRNNFLTAFDENNHFIVPISQILIGMGSSTVLFCLLGYIGIHNEIRWLLIVYAVLITWTFAVQVVLSAFIITKKEEVQQLWHDKIDFVISEYGSKDKPEDITKWTILNALQKTLQCCGQHNYTDWIKNKNKENSGQVPCSCTKSTLRKWFCDEPLNATYLEGCENKISAWYNVNVLTLIGINFGLLTSEVFQVSLTVCFFKNIKNIIHAEM
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
my $ua = new LWP::UserAgent;
$ua->agent("Mozilla/5.0");
my @urls_titles = (), @urls = (),;
my $keywords = "";
print "Enter the keywords, please:\n";
chomp($keywords = <STDIN>);
###################使用POST方式抓search result的urls#################
my $response
= $ua->post('
http://phobius.binf.ku.dk/cgi-bin/predict.pl',
{ stype => '0',
protseq => $keywords,
protfile => '',
"format" => '3',
});
if ($response->is_success) {
$_ = $response->content;
#print $_;
}
else{
print $response->error_as_HTML;
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.116.245.199
1F:推 jlovet:protseq 是不是要先encode? 10/13 17:30
2F:→ jlovet:ㄜ...忽略 10/13 17:33