Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Download a file with WWW::Mechanize

by Gangabass (Vicar)
on Apr 21, 2013 at 06:02 UTC ( [id://1029714]=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1029714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-24 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found