I most likely would get that error if I could read the socket, I tried adding another example presented.
on *:sockread:DotaBuff: {
window -deC @ $+ $sockname -1 -1 700 700
var %read
sockread -f %read
aline -p @ $+ $sockname : $+ %read
if ($sockerr) echo -ag $sockerr read
echo -ag DotaBuff Sockread
if (*Win Rate* iswm %read) {
echo -ag found it!
tokenize 32 %read
echo -ag Win Rate: $noHTML($1-)
}
}
Which opened a window with a Bad request
:HTTP/1.1 400 Bad Request
DotaBuff Sockread
:Server: nginx/1.4.7
DotaBuff Sockread
:Date: Fri, 11 Apr 2014 13:52:10 GMT
DotaBuff Sockread
:Content-Type: text/html
DotaBuff Sockread
:Content-Length: 172
DotaBuff Sockread
:Connection: close
DotaBuff Sockread
:
DotaBuff Sockread
:<html>
DotaBuff Sockread
:<head><title>400 Bad Request</title></head>
DotaBuff Sockread
:<body bgcolor="white">
DotaBuff Sockread
:<center><h1>400 Bad Request</h1></center>
DotaBuff Sockread
:<hr><center>nginx/1.4.7</center>
DotaBuff Sockread
:</body>
DotaBuff Sockread
:</html>
DotaBuff Sockread
DotaBuff Sockclose
Apologies for the Sockreads everywhere, it's just to make me understand the process a bit better.
I knew about the api from before, which is how DotaBuff pulls their info. I just thought it'd be simpler for me to read it from the DotaBuff website since they've compressed all the useful info I desire already. I might be mistaken however.