diff options
-rw-r--r-- | scrap.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -70,13 +70,12 @@ def main(): related.feed(page) killmails = [] - teams = ([], []) + teams = (set(), set()) for team, kill, owner in related.kills: time.sleep(1.05) # Zkillboard is very sensitive. killmails.append({"id": int(kill), "hash": get_hash(kill)}) destination = teams[team - 1] - if owner not in destination: - destination.append(int(owner)) + destination.add(int(owner)) if args.output: filename = args.output @@ -88,7 +87,7 @@ def main(): filename = "scrapped.json" with open(filename, "w") as file: - file.write(json.dumps({"killmails": killmails, "teams": teams})) + file.write(json.dumps({"killmails": killmails, "teams": tuple(map(list, teams))})) if __name__ == "__main__": |