Open gurchik opened 8 months ago
sure. if you can figure it out feel free to add support (the code is a real mess though). probably just copy and paste the yt subscriber data updating code and modify it to support twitch.
one tricky element is deciding when to update the information. are you intending this to power enwiki infoboxes? generally we don't want to update very frequently (even monthly is a lot) and in the past we agreed to update on major changes to the numbers or once a year (whichever is sooner).
Yes, this is intended to power enwiki infoboxes. I know there is a limit on how often we can do this, so I'll just copy the logic we use for YT subscribers. As I understand it, that would be: ignore channels with less than 5k followers, ignore channels updated in the last 60 days, and if the enwiki
flag is supplied then ignore channels that are already within 10% and have been updated in the last year (although I don't see you actually setting this enwiki
flag in the cronjob, so I'm unsure when you use this).
With that being said, I wanted to talk to you about increasing this frequency. Where would you like me to talk about this, a GH issue or the BorkedBot talk page on WikiData?
Copying the logic seems right. The --enwiki flag is being set at https://github.com/derenrich/borked-bot/blob/master/bin/borkedbot.sh though there is still some logic that isn't checked into the repo (I'll fix that today)
With that being said, I wanted to talk to you about increasing this frequency. Where would you like me to talk about this, a GH issue or the BorkedBot talk page on WikiData?
Wikidata makes the most sense. Increasing the frequency is possible but the current frequency was set as part of the RfC https://www.wikidata.org/wiki/Wikidata:Requests_for_comment/Frequency_of_YouTube_follower_count_data so reading that might be helpful
It would be great if BorkedBot could update Twitch channel followers like it does for Youtube subscribers, since many Youtube channels also run a Twitch channel and vice versa. I'm thinking this would be Social Media Followers (P8687) for entities with Twitch channel ID (P5797).
If this sounds good to you, I'm willing to help with the code (I think! I'm very comfortable with Python and Kubernetes, it's WikiData I know nothing about, I will read through your other cronjobs to get an understanding of how the queries work).