Catch another way of writing the description

This commit is contained in:
Edward Betts 2019-10-09 16:49:10 +01:00
parent 581409dcd6
commit 9cd3d3c59b

View file

@ -13,6 +13,10 @@ def get_description_from_page(html):
if div is not None:
return div.text
div_list = root.find_class('item-description')
if len(div_list):
return div_list[0].text_content()
meta_twitter_description = root.find('.//meta[@name="twitter:description"]')
if meta_twitter_description is None:
return