From 8ab48ac7791020ecde50de0c88b7f97aca9b51fa Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Sun, 23 Sep 2018 17:37:27 +0200 Subject: [PATCH] fix for parsing twitter media entities --- screenless/bureau/publicrelations/publicrelations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenless/bureau/publicrelations/publicrelations.py b/screenless/bureau/publicrelations/publicrelations.py index be172e3..62120a6 100644 --- a/screenless/bureau/publicrelations/publicrelations.py +++ b/screenless/bureau/publicrelations/publicrelations.py @@ -194,7 +194,7 @@ class PublicRelations(Bureau): prn._raw(t_enc) if "media" in tweet["entities"]: - for entity in tweet["entities"]["media"] + for entity in tweet["entities"]["media"]: i_url = entity["media_url"] filename = i_url.rsplit('/',1)[1] filename = "/tmp/" + filename