The following script fails:
use WWW::Mechanize; use strict; use warnings; my $browser = WWW::Mechanize->new(); my $url = 'http://119.167.217.206:19765/ppvaplaybyopen?url=http://119. +167.217.206/%d3%e9%c0%d6%b0%d9%b7%d6%b0%d9-100803-%d0%a1%d6%ed%bd%dc% +c2%d7%b7%d6%d7%e9%d0%e3%c7%f2%bc%bc.mp4/segno=0%26&rid=A8F1F5DFEB1B11 +F1D90B40AD1BB75D69&filelength=21293994&blocksize=2097152&blocknum=11& +blockmd5=E210862B3F92935D0883E00AA2A38F08@D793599727C6DA4ACDB1CBF2235 +004AC@D5E9C9245C9A1BB63BC5EDA862A32604@51B5FDF91356B2B4E943EF72648EB0 +AD@6F2400488B04EBF66A60336B795EA142@8E51B8DCF87A7A02B84A2CAA5FFCA3CF@ +89080D683268481694DBA6D1E22A2EFF@8F56225C76854A434385A09C319BF9C3@9AB +0A3F199183F479F8887D1C3341B1B@845FE0D711086CC2D086546CD26B35C1@9D93A9 +BE1D2EDE216AA9EBF26BF414BE'; $browser->get($url);
While Win32::IE::Mechanize successfully fetched the file:
use Win32::IE::Mechanize; use strict; use warnings; my $browser = Win32::IE::Mechanize->new(visible=>0); my $url = 'http://119.167.217.206:19765/ppvaplaybyopen?url=http://119. +167.217.206/%d3%e9%c0%d6%b0%d9%b7%d6%b0%d9-100803-%d0%a1%d6%ed%bd%dc% +c2%d7%b7%d6%d7%e9%d0%e3%c7%f2%bc%bc.mp4/segno=0%26&rid=A8F1F5DFEB1B11 +F1D90B40AD1BB75D69&filelength=21293994&blocksize=2097152&blocknum=11& +blockmd5=E210862B3F92935D0883E00AA2A38F08@D793599727C6DA4ACDB1CBF2235 +004AC@D5E9C9245C9A1BB63BC5EDA862A32604@51B5FDF91356B2B4E943EF72648EB0 +AD@6F2400488B04EBF66A60336B795EA142@8E51B8DCF87A7A02B84A2CAA5FFCA3CF@ +89080D683268481694DBA6D1E22A2EFF@8F56225C76854A434385A09C319BF9C3@9AB +0A3F199183F479F8887D1C3341B1B@845FE0D711086CC2D086546CD26B35C1@9D93A9 +BE1D2EDE216AA9EBF26BF414BE'; $browser->get($url);

The file fetch also works as expected with IE and FF when I have disabled Javascript in them.

Any idea why WWW::Mechanize fails to fetch the file?

Thanks in advance :)


In reply to Why this file fetch fails with WWW::Mechanize? by ZJ.Mike.2009

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.