Detect and tag Shorts in Youtube feeds

Some creators are good about tagging their shorts with #Shorts, but many aren’t, and for many I just do not care about their shorts as they are just clips of the longer videos.

Would be nice if, and seemingly an easy edition, if Newsblur added a Short tag for any Youtube feed item with a duration less than or equal to 60 seconds. Then one could use intelligence training to hide all shorts.

1 Like

100% this — it would instantly bring a huge improvement to my feed, and it’s probably the main thing that would make me switch reader services.

Related threads:

But, as a technical solution, the existence of the shorts-only feed is interesting. In the thread above @samuelclay was unsure whether account-wide filters would be too computationally expensive, but potentially it would be lighter to do something like the following:

  1. if the feed domain is youtube.com, it’s recognised as a YouTube feed
    • potentially with an exception list for things like the YouTube blog
  2. for YouTube feeds, offer an additional option for ‘exclude shorts’
    • in my opinion, this should default to true
  3. when that setting is enabled, also fetch the /shorts feed for the same channel (since the URL is predictable) and filter out any matching entries from the general feed (and the entry.id values in each feed match so that would be pretty trivial)

Having a site-specific setting might go against some design principles, but I would think for a platform as pervasive as YouTube and content as feed-polluting as shorts it would be worth making an exception in this case,

Question is is there a tag for shorts in the api than I can add as a tag so you can filter it on your side.

I love the idea of YouTube specific hacks, esp. as I build out a new add and discover sites feature that already has a bunch of YouTube feeds built in.

Not sure if there is a tag in the API … but the RSS does seem to have a differentiation eg from my Formula 1 feed:

Maybe this would work for what you need?

I don’t see any code or a url that has shorts in it. Can you post something I can take a look at to distinguish?

weird never got posted … sorry about that …

I saw this and thoght it could help (just a random example from the F1 Youtube feed)

curl --silent “https://www.youtube.com/feeds/videos.xml?channel_id=UCB_qr75-ydFVKSF9Dmo6izg” | grep “link rel”

shows for example:

<link rel="alternate" href="https://www.youtube.com/watch?v=dj62UQR7y7M"/>
<link rel="alternate" href="https://www.youtube.com/shorts/cdVoZklIk8o"/>
1 Like

So is a YT feed 100% shorts or it has a mix of shorts and full length videos? I need an example of a feed with both. I looked at that channel but it shows as a normal feed.

Mixed when you add a profile/channel to Newsblur at least.

Here are two that contain a mix:

The first is fairly mixed, the latter is frustratingly very heavy on shorts.

also NewsBlur

had a short in november for black friday

Here’s the problem since we use the YouTube API:

:record_button: Based on my research, the YouTube Data API v3 does not have a field to identify Shorts. This is a known gap - there’s an Google Issue Tracker asking for this.

The API returns contentDetails, snippet, and statistics but none contain a “isShort” indicator.

Available options:

1. Duration-based (≤60 seconds) - you said you don’t like this

2. RSS feed URL pattern - requires fetching the RSS feed (you don’t want extra fe

3. URL probing - hit youtube.com/shorts/{VIDEO_ID} for each video and check for 200 vs 303 redirect (even more fetches)

The YouTube API simply doesn’t expose this information.

Right with you, so as I understand it, we add a Youtube URL as a feed but NB then uses the API to fetch stories vs the RSS feed itself and the API as you said doesn’t have the shorts option. I can’t help further then with any ideas.

Personally I’d be perfectly happy going of the length as long as not better option is available. Doesn’t matter if it’s a proper “short” or not, if the video is under 90 seconds I’d rather not see it.

I’d use https://openrss.org/feeds/youtube which I assume base their feed of youtube’s feed rather than using the API since limited history is a noted limitation, however these can’t be added to Newsblur, they are overridden to Newsblurs built in API solution.

I can certainly add a tag for various durations