Wikipedia:Bots/Requests for approval/Yet another TfD implementor bot


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Bots/Noticeboard. The result of the discussion was

Yet another TfD implementor bot
Operator:

Time filed: 06:04, Thursday, June 8, 2023 (UTC)

Function overview: Merge IOC profile into Olympics.com profile.

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python

Source code available: Will release when finished https://github.com/IDON-TEXIST/IOC-profile-merge

Links to relevant discussions (where appropriate): Templates for discussion/Log/2021 May 6

Edit period(s): One time run

Estimated number of pages affected: 5581

Namespace(s): Main

Exclusion compliant (Yes/No): Yes

Function details:

On transclusions of IOC profile:
 * Search for a transclusion of Olympics.com profile. If one is found, delete the IOC profile transclusion (note that I plan on redirecting Olympic Channel to Olympics.com profile before this bot begins running. I haven’t taken a thorough look but I believe this can simply be done as they have identical content).
 * Get the ID by searching the article for the external link to the IOC profile Get the ID by parsing the template, and if that fails checking P3171 on the corresponding item page and make a HEAD request to https://www.olympic.org/$id, which will redirect to https://olympics.com/en/athletes/$newid. This is necessary because the id sometimes changes.
 * Extract the new id from the URL, and use it to replace the IOC profile with an Olympics.com profile. Note that because this is done by looking at external links, this will work even if the id is populated by the Wikidata property (the bot, however, will use a parameter rather than Wikidata). Updated 23:20, 8 June 2023 (UTC) Another edit 01:40, 9 June 2023 (UTC)

Discussion
Please do not mark these edits as minor, and ensure that a link to this BRFA is given in the edit summary, so that any issues can be better reported (URL links are something I always want as many eyes on as possible). Primefac (talk) 08:14, 8 June 2023 (UTC)
 * Snowmanonahoe (talk · contribs · typos) 01:29, 9 June 2023 (UTC)
 * Primefac (talk) 10:51, 28 June 2023 (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 Bots/Noticeboard.