Giter Club home page Giter Club logo

borked-bot's People

Contributors

dependabot[bot] avatar derenrich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ugochimobi

borked-bot's Issues

Update Youtube channel views along with subscriber count

On the English Wikipedia, the infobox for Youtubers display a subscriber count and the number of channel views. But it looks like BorkedBot doesn't update the latter, when searching on WikiData it looks like channels either don't have this number at all or it's very outdated (multiple years).

When updating the subscriber count, we also have the number of channel views, it's given in the same API response (viewCount). So it would be nice if we could update both at the same time. https://github.com/derenrich/borked-bot/blob/master/borked_bot/yt_follows/run.py#L124

youtube creator matched with Wikidata

I am playing around with outdoor gyms see Wikidata:WikiProject_Outdoor_Gyms

One user case I can see is to see what videos are connected to an outdoor gym

  • see number of views on those videos see query
  • see who produced the video i,e, is it an influencer, the government to see what videos get most views
    • I guess in Wikidata we have "YouTube channel ID" Property:P2397 that can be associated with an organisation/person

-->
Feature request: could we also get the account creating the video ? Best would be to match this account to a WIkidata account

  • the people doing Scholia has solved the problem that not every person is in Wikidata for authors by using

Thanks
user Salgo60 on WD

Add Verified status for YouTube accounts if they are

It would be great if the verified status for YouTube could be added in the same it is for Twitter (P1552:Q28378282). I can't find this in the API, but if one go to a channel page that is verified they have a div that creates this that it should be possible to check for. If it has
<div class="badge badge-style-type-verified style-scope ytd-badge-supported-renderer" aria-label="Verified"> then it is verified, and if that div is not there, it is not.

Add published in qualifier

I document discographies on Wikidata and was wondering if your bot could add P1433 as a qualifier when adding data about YouTube videos.

It should do this because many times, digital music tracks on YouTube Music are republished as different Youtube videos (YouTube Music songs) in many releases and there should only be 1 item per track, so many videos (songs) get put under 1 track item when they are republished.

Example. This track was published in a 2 Singles and an EP. Because YouTube makes new videos for every track on the release (even though they are the same track), this has multiple videos.

I added the "published in" property to help distinguish which videos were part of which releases and was wondering if your bot could do this.

It could do this by using the YouTube API to search for the playlists (YouTube Music releases) this video ID is in and then checking if Wikidata has any items with that playlist ID. I always add the YouTube playlist ID to releases, so it should be able to find it. Then, it should add that item as a qualifier statement to the video with "published in" as it's property, just as I did.

Twitch followers

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).

Add reason for preferred rank (P7452): most recent value (Q71533355)

Hi, it would be nice if update_most_recent_rank(item, prop_id, qual_id) could handle P7452 by:

  1. On statements with preferred rank and using this qualifier with something different than Q71533355, do not set the statement back to normal rank
  2. When statements are set to normal rank, removing this qualifier
  3. When statements are set to preferred rank, set this qualifier with value Q71533355
    def update_most_recent_rank(item, prop_id, qual_id):
    """
    For a property find all statements with a given qualifier value.
    Take the newest statement and make it preferred
    Make all the rest normal rank.
    """
    claims = get_valid_claims(item, prop_id)
    grouped_claims = defaultdict(list)
    for c in claims:
    qual_value = get_valid_qualifier_values(c, qual_id)
    if len(qual_value) >= 2:
    # no idea what we should do. just bail out.
    return
    if qual_value:
    grouped_claims[qual_value[0]].append(c)
    for qual_value, claims in grouped_claims.items():
    claims.sort(key=lambda c: get_point_in_time(c))
    *olders, most_recent = claims
    if not olders:
    # if there's only one don't change rank
    return
    for c in olders:
    if c.getRank() == 'preferred':
    c.changeRank('normal')
    if most_recent.getRank() != 'preferred':
    most_recent.changeRank('preferred')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.