this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Squashed commit of the following:

commit 75ae7c94120d14083217bc76ebd603b396937104
Author: Avner Shanan <avner.shanan@devbootcamp.com>
Date: Sat May 21 14:18:36 2022 -0500

Add guard clause to prevent ageinfo file import from crashing

commit f5c6b1690badd7e949a9475a0b9fe367d055e4fa
Author: Avner Shanan <avner.shanan@devbootcamp.com>
Date: Sat May 21 13:20:06 2022 -0500

Add empy ageinfo file and test that we can import it without crashing

+10
+2
tests/test_import.py
··· 33 33 "saved-search.js", 34 34 "following.js", 35 35 "follower.js", 36 + "ageinfo.js", 36 37 } == {f.filename for f in zf.filelist} 37 38 38 39 ··· 77 78 "archive_account", 78 79 "archive_app", 79 80 "archive_following", 81 + "archive_ageinfo", 80 82 } == set(db.table_names()) 81 83 82 84 assert [{"accountId": "73747798"}, {"accountId": "386025404"}] == list(
+4
tests/zip_contents/ageinfo.js
··· 1 + window.YTD.ageinfo.part0 = 2 + { 3 + "ageMeta" : { } 4 + }
+4
twitter_to_sqlite/archive.py
··· 88 88 89 89 @register_each("ageinfo") 90 90 def ageinfo(item): 91 + # Prevent newer archive formats and/or empty ageinfo files from crashing 92 + if isinstance(item, (str)) or "ageInfo" not in item["ageMeta"]: 93 + return {'ageInfo': ''} 94 + 91 95 return item["ageMeta"]["ageInfo"] 92 96 93 97