Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Download a file with WWW::Mechanize

by Gangabass (Vicar)
on Apr 21, 2013 at 06:02 UTC ( #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
Node Status?
node history
Node Type: note [id://1029714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2020-05-26 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?