Wikipedia:Bots/Requests for approval/Theo's Little Bot 18
[[User:Theo's Little Bot|Theo's Little Bot 18]]
{{Newbot|Theo's Little Bot|18}}
Operator: {{botop|Theopolisme}}
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: [https://github.com/theopolisme/theobot/blob/master/deadlink_waybacker.py on github]
Function overview: For references using {{tl|cite web}} that are currently tagged with {{tl|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 {{tl|dead link}} (or one of its redirects) inside a pair of ref tags. If the ref tags also contain {{tl|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 {{tl|dead link}} template.
=Discussion=
My second requested bot, I hope this is also approved :) Lukeno94 (tell Luke off here) 18:23, 4 June 2013 (UTC)
:{{BotTrial|edits=20}} ·addshore· talk to me! 08:28, 5 June 2013 (UTC)
::{{BotTrialComplete}} [http://toolserver.org/~snottywong/cgi-bin/commentsearch.cgi?name=Theo%27s+Little+Bot&search=Adding+archiveurl&max=100&server=enwiki&ns=none] Theopolisme (talk) 04:04, 6 June 2013 (UTC)
:::{{ping|Theopolisme}} I think something somewhere is broken see [http://en.wikipedia.org/w/index.php?title=10_Hronia_Mazi&diff=prev&oldid=558547818 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 [http://en.wikipedia.org/w/index.php?title=102.2_Jazz_FM&diff=prev&oldid=558548481 here]. ·addshore· talk to me! 10:03, 6 June 2013 (UTC)
:::Also what about edits such as [http://en.wikipedia.org/w/index.php?title=1708_in_Ireland&diff=prev&oldid=558547525 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)
:::::{{ping|Addshore}} Okay, issues have been resolved (see [https://en.wikipedia.org/w/index.php?title=10_Hronia_Mazi&diff=prev&oldid=558676565]). Can I get another trial? Theopolisme (talk) 23:08, 6 June 2013 (UTC)
:{{BotTrial|edits=30}} last thing I do before I sleep! ·addshore· talk to me! 23:09, 6 June 2013 (UTC)
:{{BotTrialComplete}} [https://en.wikipedia.org/w/index.php?title=Special:Contributions/Theo%27s_Little_Bot&dir=prev&offset=20130606233354&limit=30&target=Theo%27s+Little+Bot] Thanks for your devotion ;) Theopolisme (talk) 23:56, 6 June 2013 (UTC)
:{{BotApproved}} - 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.