mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-28 02:48:43 +00:00
Cards can have no pic
This commit is contained in:
parent
986d902ccd
commit
33342cdfb7
10
twoot.py
10
twoot.py
@ -82,12 +82,12 @@ 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:
|
||||||
list.append(image_url)
|
image_url = 'https://nitter.net' + img.get('src')
|
||||||
logging.debug('Extracted image from card')
|
list.append(image_url)
|
||||||
|
logging.debug('Extracted image from card')
|
||||||
|
|
||||||
return list
|
return list
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user