Jump to content

Wikipedia:Bots/Requests for approval/DemonDays64 Bot 2

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GreenC (talk | contribs) at 02:40, 21 January 2020 (Discussion). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Operator: DemonDays64 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 04:51, Monday, December 30, 2019 (UTC)

Function overview: To edit in HTTPS to applicable links. Everything is the same as at Wikipedia:Bots/Requests for approval/DemonDays64 Bot, but the RegEx is modified in a significant way and the www. should not be removed.

Automatic, Supervised, or Manual: Automatic

Programming language(s): Javascript Wiki Browser

Source code available: In the bot's JWB settings

Links to relevant discussions (where appropriate): Wikipedia:Bots/Requests for approval/DemonDays64 Bot

Edit period(s): When computer is on.

Estimated number of pages affected: Every page with a link on it could be edited eventually. See Wikipedia:Bots/Requests for approval/DemonDays64 Bot for more info.

Namespace(s): Mainspace

Exclusion compliant Yes

Function details:

Hello again! See Wikipedia:Bots/Requests for approval/DemonDays64 Bot; everything is the same except for the RegEx it uses.

This bot was previously approved, but concerns about it removing the www. from URLs led to me voluntarily suspending running it. I have returned to update it, but, as the RegEx, the most important part of the bot, is different, I feel that it would be inappropriate to continue with just the approval of the original version (and I would like feedback if I can do this better).

Here is the RegEx that I will use: the selection is with ((?<=(?<!\?)url ?= ?)|(?<=\[)|(?<=<ref>))(http:\/\/)?(www\.)?example\.com(?!\.) and the replacement is with https://$3example.com. The code for finding is identical to the original, but the replacement uses capture group #3, which is either www. or nothing, so that the www. is retained.

Credit to User:Lordtobi for saying how they would do it at User talk:DemonDays64#Removing www; this is very slightly modified from what they said to do.

Discussion

  • A user has requested the attention of a member of the Bot Approvals Group. Once assistance has been rendered, please deactivate this tag by replacing it with {{t|BAG assistance needed}}. — it's been almost 7 days, with no replies. I am not sure I'm doing this correctly and if I should have made/had to make this request in the first place, as this is just a request to be allowed to change the RegEx and get some other people to make sure it's good. Can someone please help? Thanks! DemonDays64 (talk) 23:26, 4 January 2020 (UTC) (please ping on reply)[reply]
Can you confirm if the bot is only changing the scheme (http -> https) and no other part of the URL? -- GreenC 02:40, 21 January 2020 (UTC)[reply]