I thought the UDP api looked simple enough, so I started to poke around just so I can get a better understanding of it. It didn't take long for me to run into a snag though.
I thought I'd use Python for some practice:
Code: Select all
uid = "mistamushu"
password = "..."
apiversion = '2'
clientname = 'xyztesting'
clientversion = '1'
tag = 'oyasumi'
host, port = ("anidb.ath.cx", 9000)
authstr = "AUTH user=%s&pass=%s&protover=%s&client=%s&clientver=%s&tag=%s" % (uid, password, apiversion, clientname, clientversion, tag)
... [i]initialize a udp socket and connect[/i]
print sock.send(authstr)
time.sleep(1)
print "receiving..."
print sock.recv(500)
...