Problems filtering "Get Live Streams" with "stream_type"

I would like to get a script that every x minutes check if a list of streamer is live or not. [Python 3.6]

I’m focusing on the request to the twitch servers and I come up with this snippet.

link      = '' + temp + '&stream_type=live'
accept    = 'application/vnd.twitchtv.v5+json'
client_id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

r = requests.get(link, headers={'Client-ID':client_id, 'Accept': accept})

In there the temp variable stay for a string with a few streamer ids separated by ,(commas).
ex. temp = '21167655,132817946,406599498,222337332'

As you can see I’ve added the stream_type as live, that’s because I would like to get only live streamers, why is the get call returning a streamer that is offline but is “streaming” an old VOD.

What am I doing wrong?

Are they doing a “ReRun” or they actually streaming and casting a VOD? Which is what it sounds like you described

In the top right corner of the streaming I can see a “RERUN” title. But the streamer seems to be live since on the top left corner near the streamer name there is the “live” white on red rectangle.

btw that’s the channel that I’m using for this test:

Looks like the kraken stream_type filter is as broken as the helix one then :expressionless:

You’ll have to iterate the streams key and manually filter out stream_type of rerun

So basically I’ve to use the same request, and then checking the
data['streams'][x][broadcast_platform] looking for the only ones that have live as value?

Filtering streams by type in the Helix API was temporarily removed a while back until they have time to address the issues plagued by that parameter. Even though you’re using Kraken, it wouldn’t surprise me if the problem persists across both APIs since they would both most likely be pulling their data from the same source. Filtering by stream type was unreliable at best, and flat out didn’t work in some instances.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.