Hi Monks,

www::mechanize GET not working for this URL 'https://ardsbc.erecruit.co.uk/'. Please can you tell me what could be the problem?

use strict; use WWW::Mechanize; my $url = "https://ardsbc.erecruit.co.uk/"; my $mech = WWW::Mechanize->new(); $mech->agent_alias('Mac Safari'); $mech->get($url); exit;

I tried changing request headers to what I get in n/w monitor(Firefox browser), but no use, still produces the same error(Error in Connecting to URL).

This is the response headers I am getting when I print the response string,

Content-Type: text/plain Client-Date: Wed, 27 Aug 2014 04:34:35 GMT Client-Warning: Internal response

I later checked the robots.txt of that site & I am fully aware of what it is written there, but just wanted to know why it is not GETting even if I am mimicking it using the same Firefox request headers!Why is Mechanize incapable of GETting that URL? Any clues?

Thanks a lot


In reply to www::mechanize $mech->get(); not working for a particular URL! by Anonymous Monk

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.