0

我希望从具有交互式菜单的网站http://revigo.irb.hr/下载信息。在使用获取表单字段后,我正在尝试以下 Perl 代码

perl -MWWW::Mechanize::Shell -e shell
get http://revigo.irb.hr/
fillout
...
submit
script

最终代码如下:

      use strict;
      use WWW::Mechanize;
      use WWW::Mechanize::FormFiller;
      use URI::URL;

      my @go_terms=qw/GO:0006612 GO:0045862 GO:0048545 GO:0007568 GO:0046326 GO:0051901  GO:0010524 GO:0006044 GO:0032024/;
      my $go_string=join("\n",@go_terms);
      my $agent = WWW::Mechanize->new( autocheck => 1 );
      my $formfiller = WWW::Mechanize::FormFiller->new();
         $agent->env_proxy();

      $agent->get('http://revigo.irb.hr/');
      $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
      $formfiller->add_filler( 'goList' => Fixed => $go_string);
      $formfiller->add_filler( 'cutoff' => Fixed => '0.4' );
      $formfiller->add_filler( 'isPValue' => Fixed => 'yes' );
      $formfiller->add_filler( 'whatIsBetter' => Fixed => 'higher' );
      $formfiller->add_filler( 'goSizes' => Fixed => '0' );
      $formfiller->add_filler( 'measure' => Fixed => 'SIMREL' );
      $formfiller->fill_form($agent->current_form);

   my $request = $agent->click("startRevigo");
      print $request->as_string;

但是我收到以下错误消息“错误发布http://revigo.irb.hr/revigo.jsp:revigo.mechanize.pm第 21 行的内部服务器错误” 有人可以帮我解决问题吗?提前致谢

4

1 回答 1

2

goSizes必须具有有效值,例如0. 您可以通过使用Firebug自己轻松发现这一点。

于 2012-06-26T11:39:22.250 回答