Use Attr in module sachsen
This commit is contained in:
parent
0362821fb6
commit
822317912f
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from weboob.tools.browser2.page import HTMLPage, method, ListElement, ItemElement
|
from weboob.tools.browser2.page import HTMLPage, method, ListElement, ItemElement
|
||||||
from weboob.tools.browser2.filters import Env, CleanText, Regexp, Field, Date, Map
|
from weboob.tools.browser2.filters import Env, CleanText, Regexp, Field, Date, Map, Attr
|
||||||
from weboob.capabilities.gauge import Gauge, GaugeMeasure, GaugeSensor
|
from weboob.capabilities.gauge import Gauge, GaugeMeasure, GaugeSensor
|
||||||
from weboob.capabilities.base import NotAvailable, NotLoaded
|
from weboob.capabilities.base import NotAvailable, NotLoaded
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ class ListPage(HTMLPage):
|
||||||
|
|
||||||
def parse(self, el):
|
def parse(self, el):
|
||||||
div = el.getparent()
|
div = el.getparent()
|
||||||
img = div.find('.//img').attrib['src'].split('/')[1]
|
img = Regexp(Attr('.//img', 'src'), "(.*?)/(.*)", "\\2")(div)
|
||||||
data = unicode(el.attrib['onmouseover']) \
|
data = unicode(el.attrib['onmouseover']) \
|
||||||
.strip('pegelein(').strip(')').replace(",'", ",").split("',")
|
.strip('pegelein(').strip(')').replace(",'", ",").split("',")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue