Wikidata:Requests for permissions/Bot/William Avery Bot 11
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
- Approved--Ymblanter (talk) 19:03, 21 April 2024 (UTC)[reply]
William Avery Bot 11 edit
William Avery Bot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: William Avery (talk • contribs • logs)
Task/s:
- Change URLs that reference the website http://runeberg.org/ to use https, per Wikidata:Bot requests#Request to update links to https (2023-11-26).
- About 20,000 items are affected, according to this database query.
Code:
Function details:
This is a pywikibot script with standard options.
The bot's process_claims() method accepts a list of claims. Each claim that has a data type of 'URL' and a string value that starts with "http://runeberg.org" is changed to start with "https", instead of "http".
The treat_page method, which is invoked on each item to be processed, carries out the following processing.
- Method process_claims() is run on the item's main list of statements
- For each of the item's statements
- For each reference on the statement
- Method process_claims() is run on the list of claims that make up the reference
- For each qualifier on the statement
- Method process_claims() is run on the list of claims that make up the qualifier
- For each reference on the statement
The list of items to be processed can be generated by this database query
Testing:
I used the script to make a test edit on test.wikidata.org: here
The above edit changes a statement, a qualifier and two references, as expected. A value of type 'string' is left unchanged.
Contributions log for the test run of 50 edits on the live site can be found here.
Discussion:
If there are no objections I will do a test run of 50 edits using the bot account on 18 April 2024. William Avery (talk) 14:05, 15 April 2024 (UTC)[reply]
- Done As far as I can see the results are as expected. William Avery (talk) 15:44, 18 April 2024 (UTC)[reply]
- I will approve the bot in a couple of days provided no objections have been raised. Ymblanter (talk) 19:05, 19 April 2024 (UTC)[reply]