Wikipedia:Bots/Requests for approval/YiFeiBot


 * 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

YiFeiBot
Operator:

Time filed: 15:13, Wednesday October 22, 2014 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): python: pywikibot

Source code available: yifeibot/addbot.py.txt

Function overview: Removing interlanguage links to from pages if the link is already on Wikidata

Links to relevant discussions (where appropriate):

Edit period(s): Weekly

Estimated number of pages affected: Unknown, should decrease over time

Exclusion compliant (Yes/No): Yes and noexternallanglinks

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

Function details: As User:Addbot has gone inactive for over a year, this task is designed to have the same functions as Addbot 32 on the Wikipedia-end. And since there are already some import bots on Wikidata, this bot will not add interlanguage links to Wikidata.

The page list is generated from database dumps, and uses a regex and some comparation to filter out pages with interlanguage links. The pages is then checked if there is any associated Wikidata item. Using the same logic, it goes through each of the interlanguage links and check if it is already on Wikidata using Wikidata's api. If the link is already on Wikidata, it proceeds to remove the link. After all interlanguage links are checked and if there is a removal, the page will be saved.

Discussion
BAG assistance needed --Zhuyifei1999 (talk) 07:42, 24 October 2014 (UTC)

 MBisanz  talk 23:07, 25 October 2014 (UTC)
 * The bot is currently blocked. Could you unblock or shall I run under main account? --Zhuyifei1999 (talk) 23:40, 25 October 2014 (UTC)
 * Unblocked. Keep in mind that only tasks approved for running or trial on the English Wikipedia may be run here. Anomie⚔ 14:41, 26 October 2014 (UTC)
 * Thanks. I've already learned from block. (That's like more than a year ago?) --Zhuyifei1999 (talk) 12:15, 27 October 2014 (UTC)
 * I'm sorry for doing 1 more edit than expected. --Zhuyifei1999 (talk) 12:15, 27 October 2014 (UTC)
 * ((BAG assistance needed)) --Zhuyifei1999 (talk) 06:46, 3 November 2014 (UTC)

Zhuyifei1999 please provide diffs and make comments on the bot edits. -- Magioladitis (talk) 09:46, 6 November 2014 (UTC)
 * @Magioladitis: thanks. The only issues I seen with RTRC are:
 * Special:Diff/631310200: Removing weird use of interlanguage links inside comments. Originally it should be designed as an interwiki link instead (prepend target with a ":"). But anyway Fixed, next time such links are skipped.
 * Special:Diff/631310596: In this case it's caused by Special:Diff/539954027 (I don't know what's the purpose of that edit). But Fixed with above
 * --Zhuyifei1999 (talk) 12:14, 6 November 2014 (UTC)


 * Can you also remove iwlinks to redirects and deleted pages, like [//en.wikipedia.org/w/index.php?title=Sindel&diff=prev&oldid=540063459]?--GZWDer (talk) 05:38, 7 November 2014 (UTC)
 * Sorry, but I'm not doing so for this task. This task is designed to be as safe as possible. I'll request task expansion iff it's very necessary. --Zhuyifei1999 (talk) 07:27, 7 November 2014 (UTC)
 * I have added code for redirect handling at yifeibot/addbot.dev.py.txt, shall I do another test run? --Zhuyifei1999 (talk) 07:23, 12 November 2014 (UTC)
 * BAG assistance needed Any input needed? --Zhuyifei1999 (talk) 05:07, 14 November 2014 (UTC)
 * I think it should be fine. —  Earwig   talk 01:58, 17 November 2014 (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.