in reply to Re: WWW:Mechanize Error[getting Junks] fetching a Page
in thread WWW:Mechanize Error[getting Junks] fetching a Page

Can you pls tell me the reason...? Only Mechanize is returning junks and no other browsers.. I didn't understand it.

  • Comment on Re^2: WWW:Mechanize Error[getting Junks] fetching a Page

Replies are listed 'Best First'.
Re^3: WWW:Mechanize Error[getting Junks] fetching a Page
by marto (Cardinal) on Dec 12, 2013 at 09:27 UTC
      You can just see it by running that script.. :)

        The entire point of the advice in How do I post a question effectively? is to save everyone time. To make you think about what you're asking, to ensure you explain yourself properly ("junks"), to show what your input, expect output and actual output. That way people may not need to run your code to tell you where the problem is. But hey, here's me rambling on when you're clearly not interested in making life easy for yourself or us.

Re^3: WWW:Mechanize Error[getting Junks] fetching a Page
by Anonymous Monk on Dec 12, 2013 at 10:10 UTC

    Can you pls tell me the reason...? Only Mechanize is returning junks and no other browsers.. I didn't understand it.

    Maybe

    Did you read WWW::Mechanize documentation for content method for your version of installed WWW::Mechanize to read and understand what it does?

    The same for save_content method?

    Did you examine the response headers ? compare them to other browsers?

    I believe that is what you would have to do to arrive at a satisfactory answer

    Hi

      Yes it is same for save_content method also. Same for $mech->response also.

      the content looks like

      ----------------------

      á&#9608;&#8729;/Z&#8616;ùƒ}&#8992;{o&#8962;u&#9565;}R-VDöIÖ&#8962;öN½e +¢/&#9608;&#9575;>:;²&#8734;t&#9618;.&#9474;6?;}&#8801;Qz&#8616;P&#957 +4;b&#8729;6¥&#9579;&#8729;&#8729;g&#9660;&#9600;%Z&#9632;&#9632;oµ&#8 +729;"o&#949;>;yr÷&#8730; &#9604;¥6&#9552;8{7&#8730;=&#9580;ï2o>úO^&#9558;&#9579;e&#9632;z&#8359 +;&#964;&#966;ÿ&#9563;&#8592;}æ5m^?&#9575;«½&#9569;|&#9617;&#9562;ù&#9 +48;&#9824;&#9488;²&#9516;l&#9618;:&#9565;&#8319;&#8734;&#8776;¬ûy[LO& +#9600;¡&#937;&#9565;i&#9563;&#9557;7&#9616;&#8595;&#8745;>°;&#9559;;& +#9660; ·h&#9576;&#9567;&#9567;éÑ&#9619;HSO M&#8594;&#9608;óZ&#9563;µÅÜ&#9 +559;?²ï&#9555;y}}&#8776;º}4&#963;&#9474;±O7#²m^]µ&#8993;&#8595;ô&#952 +4;&#8730;tZ« &#9569;§}&#8805;&#9616;&#9557;:^&#8319;8=&#8805;& +#9571; 2º_~&#8734;&#9496;I·d&#9612;¶K&#9787;öó&#964;&#9619;,.&#8805;&#963;4O& +#9660;Ñ&#9577;&#9474;&#9574;6}Y&#9554;mVªÅ&#9650;Ñ»&#8804;¼&#8359;&#9 +580;&#9561;ƒ&#9568;&#934;&#8804;iæ7&#9830;&#937;«üò&#9573;cH0 &#9788; +ht&#8776;&#949;&#960;&#9600;&#8993;{'OÅ&#9600;&#8735;&#8962;O &#9563;^N&#9524;ì&#920;ù½|&#8729;&#9612;b9½«&#9570;Ü&#9570;&#9632;¬.G& +#920;U1k&#964;út&#8359;&#8616;&#8616;&#8804;÷N·ï&#9612;[xè&#8804;t&#9 +48;w5&#9600;&#9556;&#9575;&#8992;&#9474;&#8992;&#9561;¥¥&#9500;H;&#98 +24;uG R½ƒv[]fu&#9553;&#9568;»&#9830;&#9829;jq +&#9516;&#9577;&#915;&#8804;±&#9567;&#8992;&#8962;&#920;&#920;&#9474;Å +&#9561;OLºƒñ&#9660;Å&#8593;0&#8962;(]&#945;3&#8594;{Uûô¼n>&#9559;&#95 +80;¢Q[U°&#960;&#9474;e5ó&#9496;+~É&#9668;&#8804;&#8804;&#8616;ï&#8734 +;]&#9618;(~É&#960;¢ª&#9552;&#9484;uC&#9488;}|'&#9472;&#9575;&#915; ª&#948;f&#948;Äç /&#8729;ì&#8252;&#8319;g&#9632;&#9508;$}&#8729;&#945; +&#8776;ƒV&#963;&#9558;&#8776;&#9570;êvD²&#9574;&#9564;1t&#9567;&#931; +:}&#8729;ôgg&#9608;É&#8801;U]²t>m¢&#8319;2_ĺ&#9554;óOôböVÿ&#9829;"&# +9556;&#9580;(m/FiNöX &#8734;ÿ>¢&#9668;2&#9794;p&#966;&#937;A&#9632;ïªú4[v?&#9568;&#9835;y&# +9824;¿&#8993;/&#8319;à&#8992;&#9580;&#9557;&#9568;ù&#8616;ÿè&#9580;l2 +&#915;U¥n§&#9830;`ù&#9616;I&#9660;&#9559;&#9555;°&#8804;ô&#9575;&#957 +3;=îcv&#8319;=·#&#9612;²&#9632;ÿÑp&#9565;&#9577;f&#9576;¬O &#9644;&#8992;&#949;&#9567;&#9660;&#9660;ª&#9488;&#931;Vá&#945;&#8976; +0Tt&#8805;²qu~&#9616;&#931;&#966;&#9558;yû&#9788;Ö&#9830;[&#8992;&#96 +6;QJ&#9578; &#9650;h&#8776;(¥w&#9575;&#9575;F&#964;±&#9555;á+&#9564;± +8ìô&#9561;<&#9574;§&#9786;¥º&#9608;&#9830;]µ&#915;wÑY&#915;&#9556;°&# +9616;&#9580;&#8776; òÿ% E&#9567;{[Ä&#9563;&#9532;lä9_«&#949;Çóy&#9496;&#931;¢z&#9524;s&#95 +61;&#9604;&#9658;&ƒñ&#9660;¡&#9616;}40 <&#9488;$&#9632;U&#931;&#960;_ +&#9573;a4&x&#9488;Y&#9576;êÑ&#9600;~2&#8976;f&#9579;7&#9668;:|²j&#945 +;&#8993;&#8745;B&#937;;o{ ²y&#9578;&#8252;d&#8730;&#966;m&#963;9/ü&#9532;&#9553;,&#8593;~&#937;& +#9474;S8&#9516;-çJ±²;Bî&#920;F9&#9575; &#9578;&#9560;â&#9573;<&# +9571;~ô]&#9565;&#9562;&#9644;&#9571;&#9788;ï&#963;3F&#9835;&#8804;áú& +#8735;&#8804;&#9567;&#9562;&#964;&#9600;&#9574;u&#9617;ñ@v&#9488;» $/I;H&#8592;·àÜ}&#9830;&#8594;~D&#9617;&#9794;&#934;è!&#8595;ûA@&#8776 +;&#931;&#963;&#9566;ítª&&#8319;S±&#9524;tM&#9788;o&#9612;4/o»X·&#9660 +;æP&#9492;I¬/&#9474;r&#948;#+&#9571;&#9660;ì&#9573;&#9612;¥.-o#'ñgaF& +#9556;è«&#9484; &#9824;Ü}ùtt&#9618;&#9830;'&#966;&#9572;o&#8616;&#8592;8èê~(&#9555;`kò +&#9650;}&#9566;} &#9650;&#8992;/&#8595;&#9619;Ug&#9658;&#8616;7jp&#83 +59;K·&#8804;&#9618;&#9792;íO24²&#9792;ÿExì&#9562;&#8729;ªX&#931;&#931 +;ô+5ë &#9660;â}ê&#9632;&#9567;#&#8319;.} xY&#9660;ü&#9616;&#9552;j3&#9564;}G&#934;&#949;]&#8319;k)O¥~&#9571;|^e +&#9474;oS Vµ&#8993;VÇ÷]j²&#9557;Y/&#9644;Y}¡>¡&#8729;°&#9608;y&#9571; +&#9577;kh&#9612;&#931;&#9474;&#9508;¡&#9573;6oZÉí¥&#964;&#920;èó&#955 +3;&#9508;h&#9658;&#9568;£&#8616;

      Mechanize Response

      ------------------

      Cache-Control: no-cache Date: Thu, 12 Dec 2013 10:30:10 GMT Pragma: no-cache Content-Encoding: gzip Content-Length: 13474 Content-Type: text/html; charset=utf-8 Expires: -1 Client-Date: Thu, 12 Dec 2013 10:30:29 GMT Client-Peer: 213.52.197.196:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=US/O=SecureTrust Corporation/CN=SecureTrust + CA Client-SSL-Cert-Subject: /CN=*.irecruittotal.com/L=Marlowe/ST=Buckingh +amshire/C= GB/O=Computers In Personnel Ltd. Client-SSL-Cipher: AES128-SHA Client-SSL-Socket-Class: IO::Socket::SSL Client-SSL-Warning: Peer certificate not verified Set-Cookie: ASP.NET_SessionId=udcrpv3tswb5qsmkvhu11w45; path=/; HttpOn +ly X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET X-UA-Compatible: IE=EmulateIE7

      Google Chrome response

      ----------------------

      Cache-Control:no-cache Content-Encoding:gzip Content-Length:13912 Content-Type:text/html; charset=utf-8 Date:Thu, 12 Dec 2013 10:33:59 GMT Expires:-1 Pragma:no-cache Set-Cookie:ASP.NET_SessionId=uydsqh45rs0usuanhfzkuw55; path=/; HttpOnl +y X-AspNet-Version:2.0.50727 X-Powered-By:ASP.NET X-UA-Compatible:IE=EmulateIE7

      Still I am unable to figure out the problem!! Pls help. I am not an expert. :)

        Fishy response :)
        Content-Encoding: gzip Content-Length: 13474 Content-Encoding:gzip Content-Length:13912

        What do you get for  wget -d --header="Accept-encoding: gzip" -Odumb.gzip https://thebigword-careers.irecruittotal.com/

        Can you  gunzip dumb.gzip?