Wikidata:Requests for permissions/Bot/AmmarBot 2
- 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) 16:17, 4 July 2021 (UTC)[reply]
AmmarBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Ammarpad (talk • contribs • logs)
Task/s: Import official website (P856) from English Wikipedia articles
Code: import_official_website.py
Function details: Loop over the page objects in en:Category:Official website not in Wikidata, attempt to extract the official website of the subject, and add it as official website (P856) statement to the wikidata item of the page. The script will also add imported from Wikimedia project (P143) ref for every statement added. If a page has no wikidata item, it will be skipped entirely.
I am doing this request as part of Outreachy program with my mentor Mike Peel. I will be running the script periodically probably weekly, and I will continue this even after the program has ended as new items populate the category. --Ammarpad (talk) 09:02, 28 June 2021 (UTC)[reply]
- What will it do if another item already has the same official website? --- Jura 10:33, 28 June 2021 (UTC)[reply]
- Thanks, I now see the property has distinct-values constraint (Q21502410). So in that case, the bot will refuse to add the website and instead skip the item. Ammarpad (talk) 12:53, 28 June 2021 (UTC)[reply]
- Note I have implemented this in the script. Ammarpad (talk) 11:43, 29 June 2021 (UTC)[reply]
- Thanks, I now see the property has distinct-values constraint (Q21502410). So in that case, the bot will refuse to add the website and instead skip the item. Ammarpad (talk) 12:53, 28 June 2021 (UTC)[reply]
- I am going to approve the bot in a couple of days provided no objections have been raised.--Ymblanter (talk) 18:04, 1 July 2021 (UTC)[reply]