Add sorting

This commit is contained in:
Fundor333
2025-02-01 00:37:41 +01:00
parent db18f8a435
commit 0ce402beec
2 changed files with 2 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ class HackerNewsFinder:
else:
output[hashed] = [info[0]]
data["readed"].append(link)
data["readed"] = sorted(set(data["readed"]))
with open(self.path_file + ".json", "w") as fp:
json.dump(data, fp)

View File

@@ -1 +1 @@
{"readed": [42826625, 42826624, 41096633, 41096632, 40954210, 40954209, 42840294, 42840293, 42893640, 42893639]}
{"readed": [40954209, 40954210, 41096632, 41096633, 42826624, 42826625, 42840293, 42840294, 42893639, 42893640]}