rename parser/parsers module, add get_parsers() with preference_order
This commit is contained in:
parent
54cc3b0a4a
commit
8638024756
13 changed files with 104 additions and 70 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue