Wikidata:Requests for permissions/Bot/Bot5958
- 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) 20:05, 5 June 2024 (UTC)[reply]
Bot5958 (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Hans5958 (talk • contribs • logs)
Task/s: Infer Trakt.tv ID (P8013) of an episode from the Trakt.tv ID (P8013) of the corresponding TV series
Code: https://gitlab.com/Hans5958-MWS/wikidata (to be published after polishing)
Function details:
The breakdown of the task is as follows.
- Infer Trakt.tv ID (P8013) of television series season (Q3464665) and television series episode (Q21191270) from television series (Q5398426), with possiblity of infering the ID in other ways (e.g. episode to season) (pattern is generally predictable)
- Add source of inferred from (P3452)instance of episode or season, applies to part, aspect, or form (P518)Trakt.tv ID (Q120493751), and retrieved (P813)today
- Step 1: Trakt.tv ID of series is used to form Trakt.tv ID of seasons, and same for seasons and episodes.
- Add source of stated in (P248)Trakt.tv (Q84591894), based on heuristic (P887)inferred from title (Q69652283), reference URL (P854)https://trakt.tv/*, and retrieved (P813)today
- Step 2: Item title is compared with the title on Trakt.tv via their API to ensure accuracy, discard if this validation fails.
The plan is to expand on other identifiers, but I want to start on this identifier first. The ID will be added if the season number/ordinal and episode number/ordinal are the same, as well if the title is similar (at most if both titles are the same after putting them in lower case and removing non alphanumerical characters), along with the implied same TV series.
https://w.wiki/9$$v yields around 150k items of episodes (not including series and seasons), so I wish to avoid errors before the deployment. I have researched for a while, but it is uncertain to me if the way I put the source is correct, so a suggestion of a better bundle of source is appreciated.
I have the proof-of-concept pretty much ready, but I still have to do changes before publishing it. Test edits would be made after the changes are made. This request is made in case a preeliminary review can be made.
Related discussion:
- Wikidata:Project chat#Sources on inferrence/reconciliation of property from a "parent" item (Old revision of Wikidata:Project chat)
- Wikidata:Project chat/Archive/2023/12#Is it reasonable to add identifiers to seasons and episodes of TV series by inference?
--Hans5958 (talk) 17:49, 8 May 2024 (UTC)[reply]
- Few updates:
- The code has been published on https://gitlab.com/Hans5958-MWS/wikidata.
- I have made test edits (on a season, on an episode). I have also removed a faulty property constraint, with findings on the Trakt website.
- I will continue the test edits
untilafter someone said so, as I wish for a review on how I do sources, and reverting it after 50+ edits would be a little cumbersome to me.
- Hans5958 (talk) 12:03, 9 May 2024 (UTC)[reply]
- It's been a while and there are no comments of it. With that, I have done 77 test edits; in line with the requested 50-250 edits. Link to contributions. Hans5958 (talk) 08:32, 30 May 2024 (UTC)[reply]
- I will approve the bot in a couple of days provided no objections have been raised. Ymblanter (talk) 19:15, 31 May 2024 (UTC)[reply]