Fix #3, not publishing attached images

This commit is contained in:
spla 2022-07-15 20:39:10 +02:00
pare 4f27e13c3a
commit 31a4b0a6e2

Veure arxiu

@ -422,16 +422,16 @@ if __name__ == '__main__':
is_reply = True
tweet_id = get_tweet_id(reply_id)
if len(entry.links) >= 2:
if "media_content" in entry:
with_images = True
images_list = []
images = len(entry.links) - 1
images = len(entry.media_content)
i = 0
while i < images:
image_url = entry.links[i+1].href
image_url = entry.media_content[i]['url']
image_filename = write_image(image_url)
images_list.append(image_filename)
i += 1