http://qs321.pair.com?node_id=1029714


in reply to Download a file with WWW::Mechanize

I'm sure this is not WWW::Mechanize issue because this simple script works for me:
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); #$mech->agent_alias("Windows IE 6"); $mech->get("http://dl.opensubtitles.org/en/download/file/1953419460"); $mech->save_content("result.srt");
What HTML do you have?

Replies are listed 'Best First'.
Re^2: Download a file with WWW::Mechanize
by Limbic~Region (Chancellor) on Apr 21, 2013 at 15:44 UTC
    Gangabass,
    I slept for 10 hours and haven't had a chance to test the code (which obviously was a small piece of a much larger script). I assume you are right and that the problem was elsewhere. I will see what happens and report back if still having problems.

    Update: Yep. I wasn't bothering to verify I was fetching the URL I thought I was. Instead of http://dl.opensubtitles.org/en/download/file/1953419460, I was grabbing http://dl.opensubtitles.org/en/download/file1953419460.

    Cheers - L~R

      $mech->show_progress(1);