···178178 "id": 861696799362478100,
179179 "user": 14148390,
180180 "created_at": "2017-05-08T21:38:21+00:00",
181181- "full_text": "If you use Photos (mac) & Live Photos, run this command to generate a lovely sound collage of where you’ve been https://gist.github.com/bwhitman/5be2f905556a25145dbac74fe4080739",
181181+ "full_text": "If you use Photos (mac) & Live Photos, run this command to generate a lovely sound collage of where you’ve been https://gist.github.com/bwhitman/5be2f905556a25145dbac74fe4080739",
182182 "retweeted_status": None,
183183 "quoted_status": None,
184184 "place": None,
···253253 "id": 1169242008432644000,
254254 "user": 22737278,
255255 "created_at": "2019-09-04T13:33:12+00:00",
256256- "full_text": "My new post: an explainer on “carbon capture & utilization” (CCU). CO2 captured from waste gases or the ambient air can be used to make valuable products. Could CCU help the carbon capture industry scale up? https://www.vox.com/energy-and-environment/2019/9/4/20829431/climate-change-carbon-capture-utilization-sequestration-ccu-ccs?utm_campaign=drvox&utm_content=chorus&utm_medium=social&utm_source=twitter",
256256+ "full_text": "My new post: an explainer on “carbon capture & utilization” (CCU). CO2 captured from waste gases or the ambient air can be used to make valuable products. Could CCU help the carbon capture industry scale up? https://www.vox.com/energy-and-environment/2019/9/4/20829431/climate-change-carbon-capture-utilization-sequestration-ccu-ccs?utm_campaign=drvox&utm_content=chorus&utm_medium=social&utm_source=twitter",
257257 "retweeted_status": None,
258258 "quoted_status": None,
259259 "place": None,
···278278 "id": 1169246717864136700,
279279 "user": 12497,
280280 "created_at": "2019-09-04T13:51:55+00:00",
281281- "full_text": "RT @drvox: My new post: an explainer on “carbon capture & utilization” (CCU). CO2 captured from waste gases or the ambient air can be used…",
281281+ "full_text": "RT @drvox: My new post: an explainer on “carbon capture & utilization” (CCU). CO2 captured from waste gases or the ambient air can be used…",
282282 "retweeted_status": 1169242008432644000,
283283 "quoted_status": None,
284284 "place": None,
+2-1
twitter_to_sqlite/utils.py
···11import datetime
22+import html
23import json
34import pathlib
45import time
···134135135136136137def transform_tweet(tweet):
137137- tweet["full_text"] = expand_entities(tweet["full_text"], tweet.pop("entities"))
138138+ tweet["full_text"] = html.unescape(expand_entities(tweet["full_text"], tweet.pop("entities")))
138139 to_remove = [k for k in tweet if k.endswith("_str")] + [
139140 "quoted_status_id",
140141 "quoted_status_permalink",