Skip to content

Commit

Permalink
Read newer archive files
Browse files Browse the repository at this point in the history
The newer archive files have pluralized tweet in the variable name.
  • Loading branch information
edsu committed Nov 20, 2022
1 parent f6ef9ed commit 3db4307
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup

__version__ = "0.0.9"
__version__ = "0.0.10"

def long_description():
with open("README.md") as f:
Expand Down
2 changes: 1 addition & 1 deletion twitter_archive_unshorten.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def read_url_map(path):
"""Read short/long mapping in existing data.
"""
text = open(path, encoding="utf8").read()
text = re.sub(r'^window.YTD.tweet.part0 = ', '', text)
text = re.sub(r'^window.YTD.tweets?.part0 = ', '', text)
data = json.loads(text)
url_map = {}
for tweet in data:
Expand Down

0 comments on commit 3db4307

Please sign in to comment.