Skip Menu |

This queue is for tickets about the WWW-Yahoo-Groups CPAN distribution.

Report information
The Basics
Id: 2569
Status: resolved
Priority: 0/
Queue: WWW-Yahoo-Groups

People
Owner: Nobody in particular
Requestors: slinky [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.8.1
Fixed in: (no value)



Date: Wed, 14 May 2003 03:30:00 -0400
From: ray c <slinky [...] mac.com>
To: spoon [...] cpan.org
Subject: WWW::Yahoo::Groups mod
hey man, great mod! in playing with it, i found that some of the groups i'm subscribed to are "age-restricted". to get around this i added a couple of lines: if ($content =~ /\QYou've reached an Age-Restricted Area of Yahoo! Groups.\E/gsmi) { $w->get( "http://groups.yahoo.com/adultconf?ref=&dest=%2Fgroup%2F$list%2Fmessages&accept=I%20Accept" ); $content = $w->{res}->content; } also, i've spotted a couple of groups that don't actually start with message 1. to pull from them, i duplicated the last_msg_id and turned it into a first_msg_id, requesting /groups/$list/messages/1. thanks for the hard work! ray
Date: Fri, 16 May 2003 11:30:20 +1000
To: ray c via RT <bug-WWW-Yahoo-Groups [...] rt.cpan.org>
Subject: Re: [cpan #2569] WWW::Yahoo::Groups mod
From: Iain Truskett <spoon [...] cpan.org>
RT-Send-Cc:
* ray c via RT (bug-WWW-Yahoo-Groups@rt.cpan.org) [14 May 2003 17:43]: Show quoted text
> Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=2569 >
Show quoted text
> hey man,
Show quoted text
> great mod! in playing with it, i found that some of the groups i'm > subscribed to are "age-restricted". to get around this i added a > couple of lines:
Show quoted text
> if ($content =~ /\QYou've reached an Age-Restricted Area of Yahoo! Groups.\E/gsmi) > { > $w->get( > "http://groups.yahoo.com/adultconf?ref=&dest=%2Fgroup%2F$list%2Fmessages&accept=I%20Accept" > ); > $content = $w->{res}->content; > }
Um. *Where* did you add that? I'm not on any age-restricted lists so I don't know the ins and outs of them. I'm suspecting get(), but I'm not sure. Show quoted text
> also, i've spotted a couple of groups that don't actually start with > message 1. to pull from them, i duplicated the last_msg_id and turned > it into a first_msg_id, requesting /groups/$list/messages/1.
Added! Show quoted text
> thanks for the hard work!
No problem =) cheers, -- Iain.
From: ray c
[SPOON - Thu May 15 21:30:34 2003]: Show quoted text
> * ray c via RT (bug-WWW-Yahoo-Groups@rt.cpan.org) [14 May 2003 17:43]: >
> > Full context and any attached attachments can be found at: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=2569 >
>
> > hey man,
>
> > great mod! in playing with it, i found that some of the groups i'm > > subscribed to are "age-restricted". to get around this i added a > > couple of lines:
>
> > if ($content =~ /\QYou've reached an Age-Restricted Area of
> Yahoo! Groups.\E/gsmi)
> > { > > $w->get( > >
> "http://groups.yahoo.com/adultconf?ref=&dest=%2Fgroup%2F$list%2Fmessages&accept=I%20Accept"
> > ); > > $content = $w->{res}->content; > > }
> > Um. *Where* did you add that? I'm not on any age-restricted lists so I > don't know the ins and outs of them. > > I'm suspecting get(), but I'm not sure.
i added it to the last_msg_id sub, since the first thing i want to know about a group is how many messages it has. it goes right before the regex that returns $count. the get sub may be better place, but thats not where my code works. Show quoted text
> > also, i've spotted a couple of groups that don't actually start with > > message 1. to pull from them, i duplicated the last_msg_id and
> turned
> > it into a first_msg_id, requesting /groups/$list/messages/1.
> > Added! >
> > thanks for the hard work!
> > No problem =) > > > cheers,
From: slinky
Hey Ian, i modded the get routine in Mechanize.pm 1.8.1. its a bit cludgy, but it works... sub get { my $self = shift; my $url = $_[0]; warn "Fetching $url\n" if $self->debug; my $rv; $rv = eval { # Fetch page my $rv = $self->SUPER::get(@_); # Throw if problem X::WWW::Yahoo::Groups::BadFetch->throw(error => $lh->maketext("Unable to fetch [_1]: ", $url). $self->res->code.' - '.$self->res->message) if ($self->res->is_error); # Sleep for a bit if (my $s = $self->autosleep() ) { sleep( $s ); } # Return something 0; }; if ($self->res->content =~ /\QYou've reached an Age-Restricted Area of Yahoo! Groups.\E/gsmi ) { $self->res->content =~ /dest value="(.*?)"/; my $url = "http://groups.yahoo.com/adultconf?ref=&dest=$1&accept=I%20Accept"; warn "Fetching $url (AGE VERIFICATION)\n" if $self->debug; $rv = eval { # Fetch page my $rv = $self->SUPER::get($url); # Throw if problem X::WWW::Yahoo::Groups::BadFetch->throw(error => $lh->maketext("Unable to fetch [_1]: ", $url). $self->res->code.' - '.$self->res->message) if ($self->res->is_error); # Sleep for a bit if (my $s = $self->autosleep() ) { sleep( $s ); } # Return something 0; }; } if ($@) { die $@ unless ref $@; $@->rethrow if $@->fatal; $rv = $@; } return $rv; }