Open NikosVlagoidis opened 6 years ago
Are you able to reproduce this error consistently?
@NikosVlagoidis try removing this mehod from DiffusionMessage
class. Finally, use Python 2.
Something happend with ascii encodeing.
I replaced this code
def __repr__(self):
return '{}({}, {}, {}, {})'.format(self.__class__.__name__, self.type, self.topic, self.body, self.headers)
def __str__(self):
try:
return unicode(self).encode('ascii', 'replace')
except:
resp = [self.body]
return '~~~'.join(str(s) for s in resp)
def __unicode__(self):
return '{} {} {} {}'.format(self.type, self.topic, self.body, self.headers)
I saw the other closed issue that you had the js code to parse the data from the websocket. Where did you found it? Do you have any lib or module to parse data in python?
Where did you found it?
I found it on their website.
Do you have any lib or module to parse data in python?
No, nothing outside this library. It was planned as a low level interface, nothing more.
I see they have an iframe with betslip.js but it is different than yours. fewer lines. And I cannot figure out how to parse the data.
Bet365 or William Hill?
bet 365.
I see they have an iframe with betslip.js but it is different than yours.
You have to undo their minification. You can use this tool: http://jsnice.org/
the minified is not actually the problem. I found that mine is 12k lines of code. Can you explain the process of decoding the data using this javascript file? Should I use node? The file seems huge and since I am not familiar with JS I can't figure it out.
The file seems huge and since I am not familiar with JS I can't figure it out.
I can't help you in this case. I just read through it and extracted whatever I wanted.
I get this error. Do you have any clue?