Wikipedia:Bots/Requests for approval/DemonDays64 Bot 2
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
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
- {{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)
- Now it's been 27 days. Should I have not made a separate request for this change? DemonDays64 (talk) 06:19, 26 January 2020 (UTC)
- 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)
- @GreenC: yes. In Chrome or many other non-Firefox browsers, you can see it in action at regexr
.com . Capture group 3 is used for this, and will either contain/4sk2o www.
or be empty. DemonDays64 (talk) 04:13, 21 January 2020 (UTC)
- @GreenC: yes. In Chrome or many other non-Firefox browsers, you can see it in action at regexr
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. I doubt there will be issues but let's be safe. Primefac (talk) 15:20, 30 January 2020 (UTC)