Wikipedia:Bots/Requests for approval/Antigng-bot


 * 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 neutral vote.svg Request Expired.

Antigng-bot
Operator:

Time filed: 23:51, Monday, May 30, 2016 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): C

Source code available: Yes

Function overview: Add or  to redirects that qualifies for them.

Links to relevant discussions (where appropriate):

Edit period(s): Daily

Estimated number of pages affected:, each link before number "1" or "2" (indicates there's no redirect template in the page) is subjected to this task

Exclusion compliant (Yes/No): No

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

Function details: The bot will go through [/w/api.php?action=query&list=allredirects]. For each redirect returned by the query, it will check if the redirect target contains "(disambiguation)" while the title doesn't have one and the redirect page doesn't have any redirect templates. If yes, it will add or  to the page, depending on whether the page title has "".

Discussion

 * This will be a bit more detailed to think about a trial. Why will you override exclusion requests?  Do you plan on editing in every namespace? —  xaosflux  Talk 00:10, 31 May 2016 (UTC)
 * Please manually make 10 of these edits with your own account, and list your diff's below. — xaosflux  Talk 00:10, 31 May 2016 (UTC)
 * No, I will only edit in main space. Tests here. --Antigng (talk) 00:22, 31 May 2016 (UTC)
 * Looking at mw:API:Client code, I see that there aren't any libraries listed for C. Are you using a particular library, or making requests manually? Would it be possible for you to link to the source code, say on GitHub or Bitbucket? Enterprisey (talk!) (formerly APerson) 04:22, 18 June 2016 (UTC)
 * Never mind, I found it myself. Here it is, for the curious. Enterprisey (talk!) (formerly APerson) 04:39, 18 June 2016 (UTC)

Checking for the suffix "(disambiguation)" seems like you would miss some cases, why not check for the __DISAMBIG__ page property? Legoktm (talk) 04:25, 18 June 2016 (UTC)
 * Because I need to differ from .--Antigng (talk) 11:43, 18 June 2016 (UTC)

Assuming zh:User:Antigng-bot/network and zh:User:Antigng-bot/redirect are real bot code, I'm sorry, but I can not endorse this running here. Leaving matters of style and maintainability aside, you have raw HTTP/1.0 via sockets, a hardcoded server IP, and 1000 threads making concurrent API requests. You are clearly a capable enough programmer to understand why these are very dangerous things. Let me be clear: C is surely a non-traditional language for bots, but there's nothing wrong with that per se. I love writing low-level code; it's fun and an interesting learning experience, too. The concern here is beyond that. Raw HTTP/1.0 means your bot breaks when the API switches to HTTPS-only, which is right around the corner has already happened, so I don't even think your bot can work anyway. A hardcoded server IP means you can't take advantage of the WMF's load balancing, and your bot breaks when servers change. Massively concurrent API requesting abuses expensive resources, and goes way against the bot policy; use Wikimedia Labs replica tables or dumps if possible, else deal with the fact that the bot can't run as fast as you'd like. That's okay—this isn't a high-priority task. You can still take advantage of modern web standards while sticking with C. Instead of raw socket code, why not use libcurl? Hell, even if you're insistent on not using any external libraries, getaddrinfo fixes at least one of my concerns, though it'd be unwise to try doing SSL yourself. —  Earwig   talk 05:03, 18 June 2016 (UTC)
 * Well, I'm not going to use the labs any more. I will set a reverse proxy on my laptop and proxy all raw http requests to https://en.wikipedia.org/. --Antigng (talk) 11:41, 18 June 2016 (UTC)
 * You are aware that the http interface is being removed - simply presenting http traffic on another port is not going to work - you will have to negotiate for secure sockets. — xaosflux  Talk 11:17, 25 June 2016 (UTC)


 * Indeed. OpenSSL is quite difficult. You could stick hitch in front of it and be done with it if you want something really simple. → Σ σ  ς . (Sigma) 20:00, 25 June 2016 (UTC)


 * Is there any particular reason why? → Σ σ  ς . (Sigma) 21:41, 18 June 2016 (UTC)


 * Note also T137707...:Jay8g [ V•T•E ] 03:56, 19 June 2016 (UTC)


 * I think we could go on to refine what this task will do before we concern ourselves over the technical implementation. But that said, others think they are very concerning so answers to these questions would be helpful. → Σ σ  ς . (Sigma) 20:00, 25 June 2016 (UTC)


 * As the operator has not replied this is expiring, may be opened again in the future. — xaosflux  Talk 00:19, 6 July 2016 (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.