1
0
mirror of https://gitlab.com/jeancf/twoot.git synced 2025-02-27 18:38:42 +00:00

Cards can have no pic

This commit is contained in:
jeancf 2020-12-18 21:32:26 +01:00
parent 986d902ccd
commit 33342cdfb7

@ -82,10 +82,10 @@ def process_card(card_container):
:return: list with url of image :return: list with url of image
""" """
list = [] list = []
link = card_container.get('href')
# Do not extract image for youtube links img = card_container.div.div.img
image_url = 'https://nitter.net' + card_container.div.div.img.get('src') if img is not None:
image_url = 'https://nitter.net' + img.get('src')
list.append(image_url) list.append(image_url)
logging.debug('Extracted image from card') logging.debug('Extracted image from card')