taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

commit 28b2774ce889dcef87bce32162f5326ee6e7b263
parent 0b8a0557a194a04bb148e1d717abf2e79d4c22d5
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 20 Oct 2022 14:18:06 +0200

-skip li

Diffstat:
Mtalermerchantdemos/blog/content.py | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/talermerchantdemos/blog/content.py b/talermerchantdemos/blog/content.py @@ -116,9 +116,15 @@ def add_from_html(resource_name, lang): else: titleat = lists if len(titleat) > 0: - teaser = titleat[0].prettify() + if (titelat[0].tag == 'li'): + teaser = titleat[0].contents[0].prettify() + else: + teaser = titleat[0].prettify() if (len(titleat) > 1) and (len(teaser) < 100): - teaser2 = titleat[1].prettify() + if (titelat[1].tag == 'li'): + teaser2 = titleat[1].contents[0].prettify() + else: + teaser2 = titleat[1].prettify() if len(teaser2) > len(teaser): teaser = teaser2 else: