Thread history

Fragment of a discussion from User talk:Nx
Viewing a history listing
Jump to: navigation, search
Time ascUser Activity Comment
No results

Are you talking about internal links to redirect pages? Double redirects? I'm a little confused.

Picon small.pngLiquid Blue04:15, 27 December 2011

She's talking about external links.

Nowwhat?04:17, 27 December 2011

Oh, I understand. Yeah, a bot can do that. The best way to do it would be to have the bot add a template like (broken link) next to a broken external link, which would link to and add the page to a category called "Pages with broken external links."

Picon small.pngLiquid Blue04:22, 27 December 2011

that would be a great thing. Then we could remove the links or try to find other cites.

Pink mowse.pngGodotI live in the Infinite monkey cage05:00, 27 December 2011

How does it know that they're broken?

Peter Urist for Mod!06:52, 27 December 2011
        try:
            urllib2.urlopen(url)
        except urllib2.HTTPError, err:
            if err.code == 404 or err.code == 400:

I hope you know Python.

Picon small.pngLiquid Blue06:55, 27 December 2011
 

Basically the Python URL module can raise HTML error codes, and the ones we're looking for are 404 (Not Found) and 400 (Bad Request).

Picon small.pngLiquid Blue06:57, 27 December 2011
 
 
 
 
 
Personal tools
Namespaces

Variants
Actions
Navigation
Community
Tools
support