fix for parsing twitter media entities

workspace
Brendan Howell 6 years ago
parent ef67065889
commit 8ab48ac779

@ -194,7 +194,7 @@ class PublicRelations(Bureau):
prn._raw(t_enc) prn._raw(t_enc)
if "media" in tweet["entities"]: if "media" in tweet["entities"]:
for entity in tweet["entities"]["media"] for entity in tweet["entities"]["media"]:
i_url = entity["media_url"] i_url = entity["media_url"]
filename = i_url.rsplit('/',1)[1] filename = i_url.rsplit('/',1)[1]
filename = "/tmp/" + filename filename = "/tmp/" + filename

Loading…
Cancel
Save