allow birthday to be entered with separators
This commit is contained in:
parent
6063964c68
commit
a43068648b
2 changed files with 3 additions and 2 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
import re
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from weboob.browser import LoginBrowser, URL, need_login
|
from weboob.browser import LoginBrowser, URL, need_login
|
||||||
|
|
@ -60,7 +61,7 @@ class IngBrowser(LoginBrowser):
|
||||||
billpage = URL('/protected/pages/common/estatement/eStatement.jsf', BillsPage)
|
billpage = URL('/protected/pages/common/estatement/eStatement.jsf', BillsPage)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.birthday = kwargs.pop('birthday', None)
|
self.birthday = re.sub(r'[^\d]', '', kwargs.pop('birthday'))
|
||||||
self.where = None
|
self.where = None
|
||||||
LoginBrowser.__init__(self, *args, **kwargs)
|
LoginBrowser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class INGModule(Module, CapBank, CapBill):
|
||||||
regexp='^(\d{6}|)$'),
|
regexp='^(\d{6}|)$'),
|
||||||
ValueBackendPassword('birthday',
|
ValueBackendPassword('birthday',
|
||||||
label='Date de naissance',
|
label='Date de naissance',
|
||||||
regexp='^(\d{8}|)$',
|
regexp='^(\d{2}[/-]?\d{2}[/-]?\d{4}|)$',
|
||||||
masked=False)
|
masked=False)
|
||||||
)
|
)
|
||||||
BROWSER = IngBrowser
|
BROWSER = IngBrowser
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue