Twitch streams on ESOC
-
- Pro Player
- Posts: 10282
- Joined: Jun 6, 2015
- Location: Paris
- GameRanger ID: 5529322
Twitch streams on ESOC
How does ESOC get the data from twitch to display the streams on the left? It feels like there's always a significant delay between what twitch shows and what ESOC shows
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
Re: Twitch streams on ESOC
It's only like 3 minutes, probably not a huge deal
-
- Pro Player
- Posts: 10282
- Joined: Jun 6, 2015
- Location: Paris
- GameRanger ID: 5529322
Re: Twitch streams on ESOC
gibson wrote:It's only like 3 minutes, probably not a huge deal
No it's not a huge deal, but I know a way to get the info without any delay. Unless the delay comes from twitch itself, then there's no way to fix it
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
Re: Twitch streams on ESOC
The delay is due to Twitch itself sending the data periodically, I think. Nothing we can do about it.
Pay more attention to detail.
-
- Pro Player
- Posts: 10282
- Joined: Jun 6, 2015
- Location: Paris
- GameRanger ID: 5529322
Re: Twitch streams on ESOC
Yeah but that's what I thought. The API might just be shit (twitch is honestly a pretty buggy website). Did you try to directly parse the data from twitch.tv/ageofempires3 (or whatever the twitch page listing aoe3 streams is called)? You should be able to parse the streamer names and the amount of viewers easily.
@EAGLEMUT @Gendarme
@EAGLEMUT @Gendarme
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
- musketeer925
- Retired Contributor
- Posts: 2484
- Joined: Mar 28, 2015
- ESO: musketeer925
Re: Twitch streams on ESOC
Kaiserklein wrote:Yeah but that's what I thought. The API might just be shit (twitch is honestly a pretty buggy website). Did you try to directly parse the data from twitch.tv/ageofempires3 (or whatever the twitch page listing aoe3 streams is called)? You should be able to parse the streamer names and the amount of viewers easily.
@EAGLEMUT @Gendarme
While it's true that could be parsed, doing web scraping when there is an API available isn't the best idea. Twitch maintains the API and makes sure it works all the time, but they could change the structure of that page at any time, resulting in our Twitch streams feature being broken. Effectively, while it would be possible, it'd be more work for our devs to maintain.
-
- Pro Player
- Posts: 10282
- Joined: Jun 6, 2015
- Location: Paris
- GameRanger ID: 5529322
Re: Twitch streams on ESOC
I see. Let's just hope that twitch improves their API then
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
Re: Twitch streams on ESOC
Twitch builds a cache of the status of their streams, which can be refreshed periodically between a few minutes and one hour. They're not doing refreshes specifically for one game or streamer, they're doing refreshes for the entire site.
And since lots of websites are polling their APIs every day, you can imagine they wouldn't like you to poll their servers every second or 20 seconds. So they probably discourage too fast API polling by keeping a low rate of refresh for rebuilding their streams' status cache.
In fact, that's why they're using this method of separating streams from pollable APIs, because in the past their servers got overwhelmed by people using site alerters, which polled their streams every few seconds. So, now, if you're polling their API too fast, you're not achieving anything other than maybe slowing down your site.
And since lots of websites are polling their APIs every day, you can imagine they wouldn't like you to poll their servers every second or 20 seconds. So they probably discourage too fast API polling by keeping a low rate of refresh for rebuilding their streams' status cache.
In fact, that's why they're using this method of separating streams from pollable APIs, because in the past their servers got overwhelmed by people using site alerters, which polled their streams every few seconds. So, now, if you're polling their API too fast, you're not achieving anything other than maybe slowing down your site.
-
- Ninja
- Posts: 14364
- Joined: Mar 26, 2015
Re: Twitch streams on ESOC
Maybe Twitch could use a premier Java programmer such as myself to help fix this problem
- KINGofOsmane
- Pro Player
- Posts: 3098
- Joined: Feb 24, 2015
- ESO: KINGofOsmane
- Location: Walling Town
Re: Twitch streams on ESOC
as long as i see callen streams in time all is fine :)
"Losing to Callen was the worst night of my life" Gibthedurrty 2019
"If hazza can get pr42 with team i can get pr50 with 1v1" Gibthedurrty 2018
"If hazza can get pr42 with team i can get pr50 with 1v1" Gibthedurrty 2018
Tete cs:go experienceLecastete wrote: Dude i hate this game. I am bad and i also dont have luck
Re: Twitch streams on ESOC
Dolan wrote:Twitch builds a cache of the status of their streams, which can be refreshed periodically between a few minutes and one hour. They're not doing refreshes specifically for one game or streamer, they're doing refreshes for the entire site.
And since lots of websites are polling their APIs every day, you can imagine they wouldn't like you to poll their servers every second or 20 seconds. So they probably discourage too fast API polling by keeping a low rate of refresh for rebuilding their streams' status cache.
In fact, that's why they're using this method of separating streams from pollable APIs, because in the past their servers got overwhelmed by people using site alerters, which polled their streams every few seconds. So, now, if you're polling their API too fast, you're not achieving anything other than maybe slowing down your site.
Time to move to nodejs !
Re: Twitch streams on ESOC
i could fix it for them without trying if i wanted to
Who is online
Users browsing this forum: No registered users and 3 guests