Fix typo and better cleaning of the label
This commit is contained in:
parent
6138209a2f
commit
bb5af64b9f
1 changed files with 5 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ __all__ = ['BillsPage']
|
||||||
class FormId(Filter):
|
class FormId(Filter):
|
||||||
def filter(self, txt):
|
def filter(self, txt):
|
||||||
formid = txt.split("parameters")[1]
|
formid = txt.split("parameters")[1]
|
||||||
formid = txt.split("'")[2]
|
formid = formid.split("'")[2]
|
||||||
return formid
|
return formid
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -60,7 +60,10 @@ class BillsPage(HTMLPage):
|
||||||
class item(ItemElement):
|
class item(ItemElement):
|
||||||
klass = Bill
|
klass = Bill
|
||||||
|
|
||||||
obj_label = CleanText('a[1]')
|
def condition(self):
|
||||||
|
return not (u"tous les relev" in CleanText('a[1]')(self.el))
|
||||||
|
|
||||||
|
obj_label = CleanText('a[1]', replace=[(' ', '-')])
|
||||||
obj_id = Format(u"%s-%s", Env('subid'), Field('label'))
|
obj_id = Format(u"%s-%s", Env('subid'), Field('label'))
|
||||||
obj_format = u"pdf"
|
obj_format = u"pdf"
|
||||||
obj__url = Attr('a[2]', 'href')
|
obj__url = Attr('a[2]', 'href')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue