How do I download a file with WWW::Mechanize after it submits a form?

后端 未结 3 902
自闭症患者
自闭症患者 2021-01-19 04:21

I have the code:

#!/usr/bin/perl
use strict;
use WWW::Mechanize;

my $url = \'http://divxsubtitles.net/page_subtitleinformation.php?ID=111292\';
my $m = WWW:         


        
3条回答
  •  北海茫月
    2021-01-19 04:59

    After submitting the form, you can use:

    $mech->save_content( $filename )

    Dumps the contents of $mech->content into $filename. $filename will be overwritten. Dies if there are any errors.

    If the content type does not begin with "text/", then the content is saved in binary mode.

    Source: http://metacpan.org/pod/WWW::Mechanize

提交回复
热议问题