Wikipedia:Bots/Requests for approval/Theo's Little Bot 18


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved

Theo's Little Bot 18
Operator:

Time filed: 17:41, Tuesday June 4, 2013 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python (with a variety of libraries)

Source code available: on github

Function overview: For references using cite web that are currently tagged with dead link, the bot attempts to add the  parameter using the Wayback Machine.

Links to relevant discussions (where appropriate): botreq, similar but now inactive bot

Edit period(s): Daily

Estimated number of pages affected: Lots

Exclusion compliant (Yes/No): Sure

Already has a bot flag (Yes/No): Yep

Function details: For all pages in Category:All articles with dead external links, looks for dead link (or one of its redirects) inside a pair of ref tags. If the ref tags also contain cite web, the bot grabs the URL parameter from the template, and then checks to make sure the link in question really is a dead link. If it is, then the bot looks for an  parameter; if it finds one, then it queries the Wayback Machine for the archive that was made closest to the accessdate. If there is no accessdate, the bot simply uses the most recent archive. The bot then adds  and   to the template, using the details from the Wayback Machine, and removes the dead link template.

Discussion
My second requested bot, I hope this is also approved :) Luke no 94  (tell Luke off here) 18:23, 4 June 2013 (UTC)
 *  ·addshore·  talk to me! 08:28, 5 June 2013 (UTC)
 *  Theopolisme ( talk )  04:04, 6 June 2013 (UTC)
 * I think something somewhere is broken see this edit where the bot seems to inviten parameters after the first deadlink on a page has been fixed! Oddly is doesnt always seen to happen as here.  ·addshore·  talk to me! 10:03, 6 June 2013 (UTC)
 * Also what about edits such as this where the link in the ref is actually an archive link? :)  ·addshore·  talk to me! 10:06, 6 June 2013 (UTC)
 * Re #1, I think this might be a bug with mwparserfromhell, or at least a bug in my implementation of it, so I've raised an issue at its github repository. Re #2, I've fixed it with a check to make sure |url doesn't contain the string "web.archive.org". Thanks,  Theopolisme ( talk )  16:42, 6 June 2013 (UTC)
 * Okay, issues have been resolved (see ). Can I get another trial?  Theopolisme ( talk )  23:08, 6 June 2013 (UTC)
 * last thing I do before I sleep!  ·addshore·  talk to me! 23:09, 6 June 2013 (UTC)
 * Thanks for your devotion ;)  Theopolisme ( talk )  23:56, 6 June 2013 (UTC)
 * - Second trial definitely looks better than the first :)  ·addshore·  talk to me! 11:05, 7 June 2013 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.