mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2014
Posts: 215
J
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: https://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
Joined: Mar 2014
Posts: 215
J
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
Joined: May 2014
Posts: 13
S
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

Joined: Mar 2014
Posts: 52
P
Babel fish
Offline
Babel fish
P
Joined: Mar 2014
Posts: 52
works fine for me. i tried the justin api tho

Joined: May 2014
Posts: 13
S
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

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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.

Joined: Mar 2014
Posts: 215
J
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
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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?

Joined: Mar 2014
Posts: 215
J
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

Link Copied to Clipboard