Wikidata:Requests for permissions/Bot/Josh404Bot 1
- 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 --Lymantria (talk) 05:16, 19 April 2021 (UTC)[reply]
Josh404Bot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools) Operator: Josh404 (talk • contribs • logs)
Task/s: For any film Q11424 with an IMDb ID Property:P345, attempt to find and add associated TMDb movie ID Property:P4947.
Code: https://ipfs.io/ipfs/QmRMJ3SqKaA7P7jLMWnSg8CoLqrW8ZwrZWeVTBEQ4iqWeP/main.py
Function details:
Most film Q11424 entities are already associated with an IMDb ID Property:P345. Using the TMDb API, we can unambiguously find the TMDb movie ID Property:P4947 match for a given IMDb ID.
The posted code uses the SPARQL service to find entities that have IMDb IDs but not TMDb IDs. Statements are then outputted for import in the QuickStatements CSV format.
The current implementation is limited to matching from IMDb to TMDb. It would also be desirable to match in the reverse direction. This could help automatically clean up "Item IMDb ID (P345)" violations on Wikidata:Database reports/Constraint violations/P4947.
This is my first bot request, and please let me know if there’s anything else I can do. I’d love to implement additional ones in the future. Thank you!
- does this code properly handle deprecated imdb statements? also you might want to make sure the statements are of the right type (i.e. start with "tt"). BrokenSegue (talk) 13:33, 8 April 2021 (UTC)[reply]
does this code properly handle deprecated imdb statements?
- I think so since I’m using the
wdt:
namespace. Let me know if there’s a preferred way to filter out those other statements with SPARQL. also you might want to make sure the statements are of the right type (i.e. start with "tt")
- Not a bad idea to add an additional a sanity check for that. There’s some guards in place around since I’m only filtering for “film” instances. (Though, maybe I should add “television special” as well, appears to be allowed.) There shouldn’t be any “nm”s on those entities. The TMDb lookup code is only handling movie results at the moment. So even if a “nm” slipped though, the TMDb API would return no matches. I’ll have to follow up with a “TMDb person ID” bot in the future!
- Thanks for the comments! Josh404 (talk) 17:14, 8 April 2021 (UTC)[reply]
- ok cool based on that I'm fine with Support of this BrokenSegue (talk) 18:01, 8 April 2021 (UTC)[reply]
- Thanks! Since this is my first bot, what are the next steps for receiving the "bot" flag on that account? And does that approval process only need to happen once? Josh404 (talk) 18:38, 11 April 2021 (UTC)[reply]
- Can you provide a link to 50-200 test edits you consider "production" quality? --- Jura 07:51, 16 April 2021 (UTC)[reply]
- Surely, I posted a list here https://www.wikidata.org/wiki/Topic:W77ojhy3x4tq7c7h Josh404 (talk) 18:08, 16 April 2021 (UTC)[reply]
- "Can you add them to Wikidata with the bot account? --- Jura 19:18, 16 April 2021 (UTC)[reply]
- Okay, posted. https://www.wikidata.org/w/index.php?target=Josh404Bot&namespace=all&tagfilter=&start=2021-04-16&end=2021-04-16&limit=50&title=Special%3AContributions
- (Sorry, I wasn't sure if should wait for approval before publishing those.) Josh404 (talk) 22:00, 16 April 2021 (UTC)[reply]
- Normally not, but some of the recent requests left me puzzled as well. Anyways, I checked a few samples and they seem to match the correct film, at least one with the same name from the same year. As far as I'm concerned, the bot can be approved. --- Jura 23:09, 16 April 2021 (UTC)[reply]
- Thanks Jura! Josh404 (talk) 23:11, 16 April 2021 (UTC)[reply]
- Normally not, but some of the recent requests left me puzzled as well. Anyways, I checked a few samples and they seem to match the correct film, at least one with the same name from the same year. As far as I'm concerned, the bot can be approved. --- Jura 23:09, 16 April 2021 (UTC)[reply]
Strong oppose until the production quality test edits have been provided and we have had time to review them. (This merely to avoid that it gets prematurely approved based on possibly absent or problematic test edits we have had time to review). --- Jura 07:51, 16 April 2021 (UTC)[reply]- @Lymantria: can you review? --- Jura 07:42, 17 April 2021 (UTC)[reply]
I will approve the request in a couple of days, provided that no objections will be raised. Lymantria (talk) 07:47, 17 April 2021 (UTC)[reply]