Ah, I was going to say that "get_page" automatically delays but then
noticed the patch didn't use get_page but accessed the mech object
directly. I've updated that in the code so it now uses the built-in
"follow_to" method, which will build in the delay. I also added the
"SignOut" RE to the call so get_page will make multiple attempts to
load the home page. I suspect that we're seeing more myspace
instability there, so this should help get around it.
In addition I've changed get_page so that if $self->human is true
it'll delay a few seconds between retry attempts (which basically
look like reloads to the server) and then will delay another few
seconds after the successful request.
On Jun 2, 2007, at 10:33 AM, Olaf Alders via RT wrote:
Show quoted text>
> Queue: WWW-Myspace
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=27390 >
>
>
> On 2-Jun-07, at 1:16 PM, Mike Allred via RT wrote:
>
>>
>> Sat Jun 02 13:16:23 2007: Request 27390 was acted upon.
>> Transaction: Ticket created by mikejallred@gmail.com
>> Queue: WWW-Myspace
>> Subject: Delay needed for getting Home page in site_login,
>> with patch
>> Broken in: (no value)
>> Severity: (no value)
>> Owner: Nobody
>> Requestors: mikejallred@gmail.com
>> Status: new
>> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=27390 >
>>
>>
>> It looks like Myspace detects quick successive GETs and does
>> unexpected
>> things (like showing the "blank"/ad page). The site_login method
>> triggers
>> this behavior unless there is a delay. Also changed to
>> follow_link so that
>> it emulates a human click on the "Home" link better.
>
> Hi Mike,
>
> I've just applied this patch as well. Very cool! Thanks very much.
>
> Olaf
>
> --
> Olaf Alders
> olaf@wundersolutions.com
>
>
http://www.wundersolutions.com
>
>
>
>