Fix #3, not publishing attached images

master
spla 11 months ago
parent 4f27e13c3a
commit 31a4b0a6e2

@ -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

Loading…
Cancel
Save