[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#581622: [qa.debian.org] Please provide a code.google.com redirector



On Fri, 3 Sep 2010 08:56:08 +0200, Ricardo Mones wrote:

> On Fri, 3 Sep 2010 08:01:35 +0200
> Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> wrote:
> 
> > On Wed, Jun 02, 2010 at 10:14:38PM +0200, David Paleino wrote:
> > > Hello people,
> > > 
> > > On Fri, 14 May 2010 13:07:32 +0200, Peter Fritzsche wrote:
> > >   
> > > > code.google.com seems to become one of the most used code hosting
> > > > websites [..]  
> > > 
> > > I was not aware of this bug, and a couple of days ago I launched a
> > > googlecode redirector [0]: http://googlecode.debian.net . I hope it's
> > > useful for you :)
> > > 
> > > (on a side note, as a QA effort, maybe we should list currently available
> > > *.debian.net redirectors in a wiki.debian.org page?)  
> > 
> > I do not know if someone already posted, did not found. The googlecode
> > redirector seems to not work anymore. E.g. if I use
> > 
> > 	http://googlecode.debian.net/p/clive
> > 
> > it returns nothing. 
> 
>   It's trying to retrieve http://p.googlecode.com/files/<projectname> but
>   files are now at http://<projectname>.googlecode.com/files/<filename>.

No, it's not. How can you tell what my code is trying to do? :-)

(no, you didn't read the source [0], otherwise you would've known ;-))

>   Anyway now the http://<projectname>.googlecode.com/files/ URL is not
>   listable, so chances are this approach has died. 

I'm not listing /files/, sorry. That's why I did the redirector on first place.

>   I guess this redirector should be changed to parse the page
>   http://code.google.com/p/<projectname>/downloads/list instead, which
>   should be no problem. [..]

It already does this. However, sometimes Google changes their code a bit [1],
so the HTML parser fails, and someone needs to ping me (if I'm not already
aware).

Here's what I used up to now:

    pattern = "
    onclick=\"location.href='(http:\/\/%s.googlecode.com\/files\/.*)';.*\"$"

(%s is the project name).

Here it is, the new pattern:

    pattern = " <a href=\"(http:\/\/%s.googlecode.com/files/.*)\" onclick=.*$"

I just pushed it [2], and it works again: http://googlecode.debian.net/p/clive

I understand that, being a non-official service, hosted on a non-Debian machine,
pinging me each time it breaks could be annoying (also given the frequency
Google changes its code9 -- but I don't see any other way :/

Have a nice day,
David

 [0]: http://git.debianit.it/?p=googlecode.git
 [1]: http://git.debianit.it/?p=googlecode.git;a=commit;h=28fa97c
 [2]: http://git.debianit.it/?p=googlecode.git;a=commitdiff;h=e25b2b

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature


Reply to: