Fix #3, not publishing attached images

This commit is contained in:
spla 2022-07-15 20:39:10 +02:00
pare 4f27e13c3a
commit 31a4b0a6e2
S'han modificat 1 arxius amb 3 adicions i 3 eliminacions

Veure arxiu

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