Wikidata:Requests for permissions/Bot/Bot5958

From Wikidata
Jump to navigation Jump to search

Bot5958[edit]

Bot5958 (talkcontribsnew itemsnew lexemesSULBlock logUser rights logUser rightsxtools)
Operator: Hans5958 (talkcontribslogs)

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.

  • Add source of inferred from (P3452)instance of episode or season, applies to part (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.
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:

--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 until 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]