aibility to backends to define a specific pages charset

This commit is contained in:
Romain Bignon 2010-04-04 16:51:05 +02:00
commit 655bc10e3e
3 changed files with 11 additions and 12 deletions

View file

@ -39,12 +39,13 @@ class AdopteParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self, tree=treebuilders.getTreeBuilder("dom"))
def parse(self, data):
return HTMLParser.parse(self, data, encoding='iso-8859-1')
def parse(self, data, encoding):
return HTMLParser.parse(self, data, encoding=encoding)
class AdopteUnMec(Browser):
DOMAIN = 'www.adopteunmec.com'
PROTOCOL = 'http'
ENCODING = 'iso-8859-1'
PAGES = {'http://www.adopteunmec.com/': LoginPage,
'http://www.adopteunmec.com/index.html': LoginPage,
'http://www.adopteunmec.com/index.php': LoginPage,