Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a7d56df authored by Israel Yago Pereira's avatar Israel Yago Pereira
Browse files

Fallback on any h1

parent 378a25a0
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ def get_title_from_htmltree(htmltree: BeautifulSoup):
    title = htmltree.select_one('[data-elasticsearch-title]')
    if title == None:
        title = htmltree.find('h1', { "class" : "post-title" })
    if title == None:
        title = htmltree.find('h1')
    if title == None:
        return None
    return title.text.strip()