rename parser/parsers module, add get_parsers() with preference_order

This commit is contained in:
Christophe Benz 2010-04-16 18:00:44 +02:00
commit 8638024756
13 changed files with 104 additions and 70 deletions

View file

@ -26,7 +26,7 @@ import time
from logging import warning, error, debug
from copy import copy
from weboob.tools.parser import StandardParser
from weboob.tools.parsers import get_parser
# Try to load cookies
try:
@ -110,7 +110,7 @@ class BaseBrowser(mechanize.Browser):
# ------ Browser methods ---------------------------------------
def __init__(self, username=None, password=None, firefox_cookies=None, parser=StandardParser(), history=NoHistory()):
def __init__(self, username=None, password=None, firefox_cookies=None, parser=get_parser(), history=NoHistory()):
mechanize.Browser.__init__(self, history=history)
self.addheaders = [
['User-agent', self.USER_AGENT]