*set UTF-8 encoding for result of reverse lookup (should fix problems with german Umlauts).
def gotPage(self, html):
# print "[FritzProtocol] gotPage"
- f = open("/tmp/reverseLookup.html", "w")
- f.write(html)
- f.close()
found = re.match('.*<td.*?class="cel-data border.*?>(.*?)</td>', html, re.S)
if found:
td = found.group(1) # group(1) is the content of (.*?) in our pattern
+ td.decode("ISO-88-59-1").encode("UTF-8")
text = re.sub("<.*?>", "", td) # remove tags and their content
text = text.split("\n")