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 Approved.
Operator: Theopolisme (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
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 archiveurl
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 accessdate
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 archiveurl
and archivedate
to the template, using the details from the Wayback Machine, and removes the {{dead link}} template.
Discussion
[edit]My second requested bot, I hope this is also approved :) Lukeno94 (tell Luke off here) 18:23, 4 June 2013 (UTC)[reply]
- Approved for trial (20 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·addshore· talk to me! 08:28, 5 June 2013 (UTC)[reply]
- Trial complete. [1] Theopolisme (talk) 04:04, 6 June 2013 (UTC)[reply]
- @Theopolisme: 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)[reply]
- 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)[reply]
- 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)[reply]
- @Addshore: Okay, issues have been resolved (see [2]). Can I get another trial? Theopolisme (talk) 23:08, 6 June 2013 (UTC)[reply]
- 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)[reply]
- Trial complete. [1] Theopolisme (talk) 04:04, 6 June 2013 (UTC)[reply]
- Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. last thing I do before I sleep! ·addshore· talk to me! 23:09, 6 June 2013 (UTC)[reply]
- Trial complete. [3] Thanks for your devotion ;) Theopolisme (talk) 23:56, 6 June 2013 (UTC)[reply]
- Approved. - Second trial definitely looks better than the first :) ·addshore· talk to me! 11:05, 7 June 2013 (UTC)[reply]
- 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.