Created
March 3, 2021 11:28
-
-
Save WWelna/02ffeacfe0fa869aaaa9f5f557d88a5b to your computer and use it in GitHub Desktop.
DDoSecrets - Gab Stats - User Creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import orjson as json | |
from datetime import datetime | |
import dateutil.parser | |
import collections | |
dates = {} | |
with open('/xs/Archive-Gab/ddosecrets_gabdump.json') as f: | |
for line in f: | |
try: | |
j = json.loads(line) | |
if j['__DBEXPORT__'] == 'accounts': | |
j2 = json.loads(j['data']) | |
d = dateutil.parser.isoparse(j2['created_at']) | |
ds = d.strftime('%Y-%m-%d') | |
if ds in dates: | |
dates[ds] += 1 | |
else: | |
dates.update({ds:1}) | |
except: pass | |
k = sorted(dates.keys()) | |
r = collections.OrderedDict() | |
for e in k: | |
r.update({e:dates[e]}) | |
print(json.dumps(r).decode('utf-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment