Wikipedia:Bots/Requests for approval/MadmanBot 14


 * 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

MadmanBot 14
Operator:

Time filed: 16:26, Wednesday March 28, 2012 (UTC)

Automatic, Supervised, or Manual: Automatic.

Programming language(s): PHP.

Source code available: Yes.

Function overview: Changes host of (dead) external links to www.zerozerofootball.com to www.footballzz.co.uk. Replaces links to http://www.zerozerofootball.com/jogador.php with Zerozero profile to accommodate any future changes in domain name.

Links to relevant discussions (where appropriate): Wikipedia talk:WikiProject Football, Bot requests/Archive 47

Edit period(s): One-time run.

Estimated number of pages affected: 1771.

Exclusion compliant (Y/N): Yes.

Already has a bot flag (Y/N): Yes.

Function details: 50 example diffs of first change here, 50 example diffs of second change here.

Discussion
"Edits" look fine technically. Any chance something like above can be handled? Like a report of pages that may have "zerozerofootball" somewhere for manual review. And replacing obvious ones. — HELL KNOWZ  ▎TALK 16:45, 28 March 2012 (UTC)
 * Yes, I can have it replace "zerozerofootball.com" within link text with "footballzz.co.uk". &mdash; madman 17:01, 28 March 2012 (UTC)
 * What about outside links, specifically following on the same line in external links: — HELL KNOWZ  ▎TALK 17:09, 28 March 2012 (UTC)




 * There's also could be stuff like zerozerofootball.com. — HELL KNOWZ  ▎TALK 17:03, 28 March 2012 (UTC)
 * If it's within the link text, it would be changed. If not, I'd be a little hesitant to change it, I think. I'm not saying I couldn't do it and do it correctly, but I'd want to hard-code the names of templates that should be changed and that sort of thing. It's a little context-sensitive, whereas changing explicit links to the site is pretty foolproof. &mdash; madman 17:06, 28 March 2012 (UTC)
 * I think publisher and work are generally safe to change. — HELL KNOWZ  ▎TALK 17:09, 28 March 2012 (UTC)
 * I'll look into changing those template parameters. As far as replacing any instance of the host name within the content of the article... I don't know. If the requester wanted me to do that and I was approved to do so, I would (I'll direct the requester here). But it just seems to be asking to screw up an edge case I haven't thought of. (I'm a little conservative; can you tell? ) &mdash; madman 17:13, 28 March 2012 (UTC)

I'll update the code later today to change the domain name within link text, no problem. I'm fine with changing the domain name on the same line as the link as well. Templates might be a little more difficult, as I can't use a regular expression for that and my template parser currently needs the names of the templates to change. The scope of this task is larger than I anticipated. But I suppose it helps me test my framework and gives me code that can be reused later. &mdash; madman 17:39, 28 March 2012 (UTC)
 * Hi, I'm the original proposer/nominator. Ideally I'd like all links changed to meet Zerozero profile, if that's possible. GiantSnowman 17:55, 28 March 2012 (UTC)
 * They will be. See for example edits. Right now we're discussing to what extent links that are to zerozerofootball.com but are not to a profile should changed. Hellknowz, I have modified the code to change the domain name within link text and on the same line at the link; please see the updated diffs.
 * Note that I'm not changing references that aren't to the domain name (e.g. Profile at ZeroZero, zerozerofootball), as I'm not altogether clear on the name of the site; it says football.co.uk in the title (which is wrong), has a top bar that says zerozero, a logo that says footballzz.co.uk, and a login that says Club ZeroZero. &mdash; madman 18:32, 28 March 2012 (UTC)
 * I don't think template parameters are going to need to be changed. It looks like when zerozerofootball.com appears in the publisher parameter, it's in an external link, which means it gets changed properly. I need to have the bot also change bare URLs (e.g. http://www.zerozerofootball.co.uk/... and that should cover all bases. &mdash; madman 18:39, 28 March 2012 (UTC)
 * Now bare URLs are changed; in the subset of pages being used for trials, there's at least one change to every page and there are no references at all to the old domain name within the content of the page after changes. &mdash; madman 19:47, 28 March 2012 (UTC)
 * I don't think template parameters are going to need to be changed. It looks like when zerozerofootball.com appears in the publisher parameter, it's in an external link, which means it gets changed properly. I need to have the bot also change bare URLs (e.g. http://www.zerozerofootball.co.uk/... and that should cover all bases. &mdash; madman 18:39, 28 March 2012 (UTC)
 * Now bare URLs are changed; in the subset of pages being used for trials, there's at least one change to every page and there are no references at all to the old domain name within the content of the page after changes. &mdash; madman 19:47, 28 March 2012 (UTC)

— HELL KNOWZ  ▎TALK 19:49, 28 March 2012 (UTC)
 * – &mdash; madman 20:29, 28 March 2012 (UTC)

All good, have fun. — HELL KNOWZ  ▎TALK 20:33, 28 March 2012 (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.