mIRC Home    About    Download    Register    News    Help

Print Thread
[help] getting errors with twitch api #247308 27/07/14 07:50 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Didn't think reviving an old thread would be a good idea
old one: http://forums.mirc.com/ubbthreads.php/topics/246660/Re:_Running_commercials_with_t

In the past week or so the twitch API hasn't been working. Always says could not set topic or could not follow. I have not made any edits to the twitch.mrc, but i did move it over to an actual cloud server (aws.amazon.com). Could there be some ports i need to open or do anything in the server to get the the twitch api working?


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: [help] getting errors with twitch api [Re: judge2020] #247310 27/07/14 09:23 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
also:
i tried totally redownloading twitch.mrc AND using a whole new registered application, still no luck


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: [help] getting errors with twitch api [Re: judge2020] #247319 28/07/14 05:00 PM
Joined: May 2014
Posts: 13
S
Shakar Offline
Pikka bird
Offline
Pikka bird
S
Joined: May 2014
Posts: 13
I am also having the same issue, but what the script is not the issue, but the JSON parsing.
For some reason that I haven't been able to find out yet, json.mrc is not able to parse the response from twitch api anymore

Re: [help] getting errors with twitch api [Re: Shakar] #247326 29/07/14 04:44 PM
Joined: Mar 2014
Posts: 52
P
patrickplays Offline
Babel fish
Offline
Babel fish
P
Joined: Mar 2014
Posts: 52
works fine for me. i tried the justin api tho

Re: [help] getting errors with twitch api [Re: patrickplays] #247332 30/07/14 02:13 PM
Joined: May 2014
Posts: 13
S
Shakar Offline
Pikka bird
Offline
Pikka bird
S
Joined: May 2014
Posts: 13
If I parse directly from a url, it works fine. But if it saves the data to a text file then the parsing fails

Re: [help] getting errors with twitch api [Re: Shakar] #247334 30/07/14 03:35 PM
Joined: Jan 2004
Posts: 1,350
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,350
The script did not originally support chunked transfer encoding which Twitch seemed to use even when requesting HTTP/1.0; this resulted in corrupt files. If you grab and replace the sockread event from github it should work again.

If that is not the case, you need to find the line it's failing at and come up with a reproducible example.

Re: [help] getting errors with twitch api [Re: Loki12583] #247342 30/07/14 08:49 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
i feel like i need to open some port on my server since i get an instant "could not set status", not delayed where it's trying. I opened the HTTPS 443 port (inbound and outbound) through the windows firewall and server firewall, but still gives instant error.


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: [help] getting errors with twitch api [Re: judge2020] #247345 30/07/14 10:15 PM
Joined: Jan 2004
Posts: 1,350
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,350
I think getting an instant reply indicates that there was no socket error, but an error in the response. Why don't you check how far you're getting and what's in the file?

Re: [help] getting errors with twitch api [Re: Loki12583] #247395 01/08/14 12:46 AM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
i don't get what you mean by
Quote:
what's in the file?
i don't see it writing to any file, also removing the
Code:
  .remove %header | .remove %data
in signal topic.set doesn't do anything, so it looks like it doesn't get to the signal.
Code:
    hadd %sockname signal topic.set
looks like the signal topic.set needs some input there..
Code:
  var %err = $1, %sockname = $2, %header = $3, %data = $4
don't know if you need to input some stuff but i basically see that as a alias


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball