[filter] improve Join filter
The filter will now act a little bit more like the join command I also added some parameters that will help formatting (newLine, addBedore, addAfter)
This commit is contained in:
parent
a3d351eb88
commit
11a63c33ce
5 changed files with 22 additions and 10 deletions
|
|
@ -125,8 +125,8 @@ class Description(Filter):
|
|||
return Format(u'%s %s\n\n%s%s\n\n',
|
||||
CleanText("%s/div[@class='d-rubric-inner']/h1" % header),
|
||||
CleanText("%s/div[@class='d-rubric-inner']/small" % header),
|
||||
Join(u'- %s\n', "%s/ul[@class='pvi-product-specs']/li" % header),
|
||||
Join(u'- %s\n', "%s/ul/li" % section))(el[0])
|
||||
Join(u'- ', "%s/ul[@class='pvi-product-specs']/li" % header, newline=True),
|
||||
Join(u'- ', "%s/ul/li" % section, newline=True, addBefore=' - '))(el[0])
|
||||
|
||||
|
||||
class EventPage(HTMLPage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue