From be122f0fa6f9f2af17d0090256590ab016f80c5d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 12 Mar 2015 15:22:29 +0100 Subject: [PATCH] add 'replace' xpath function --- weboob/browser/pages.py | 1 + 1 file changed, 1 insertion(+) diff --git a/weboob/browser/pages.py b/weboob/browser/pages.py index 5f4c1751..7bd61bea 100644 --- a/weboob/browser/pages.py +++ b/weboob/browser/pages.py @@ -508,6 +508,7 @@ class HTMLPage(Page): overloaded by children classes to add extra functions. """ ns['lower-case'] = lambda context, args: ' '.join([s.lower() for s in args]) + ns['replace'] = lambda context, args, old, new: ' '.join([s.replace(old, new) for s in args]) def has_class(context, *classes): """