-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.py
153 lines (118 loc) · 31.1 KB
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import enum, hashlib
from datetime import date, timedelta
class Catalogue():
def __init__(self, interval):
self.interval = interval
self.dataArray = {}
#def createDateArray(self):
def addDate(self, newArticle):
try:
new_date = self.normDate(newArticle['date'])
#print(newArticle['date'], "=>", new_date)
date = new_date.split(" ")
if self.interval == Interval.Day: dateKey = " ".join(date)
elif self.interval == Interval.Month: dateKey = " ".join(date[1:])
elif self.interval == Interval.Year: dateKey = " ".join(date[2:])
if dateKey in self.dataArray:
if self.hashArticle(newArticle) not in self.dataArray[dateKey]["articles"]:
self.dataArray[dateKey]["count"] += 1
self.dataArray[dateKey]["articles"].append(self.hashArticle(newArticle))
else:
self.dataArray[dateKey] = {"count": 1, "articles": []}
self.dataArray[dateKey]["articles"] = [self.hashArticle(newArticle)]
except Exception as e:
pass
#print("Error while parsing. Skipping entry for: ", newArticle)
def getNumEntries(self):
return len(self.dataArray)
def getData(self):
return self.dataArray
def hashArticle(self, article):
article = article['title'].encode('utf-8')
m = hashlib.sha1(article).hexdigest()
return m
def saveData(self):
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
filledDataArray = self.fillDates(self.dataArray)
headers = "Date, Total \n"
body = ""
for date in filledDataArray:
abvDate = date.split(" ")
abvDate[0] = months[int(abvDate[0])-1]
abvDate = " ".join(abvDate)
dateRecord = abvDate+","+str(filledDataArray[date]["count"])+"\n"
body += dateRecord
text = headers+body
f = open("data.csv", mode="w")
f.write(text)
f.close()
def normDate(self, dateParam):
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
dateArr = dateParam.split(" ")
if "ago" not in dateArr:
dateArr[1] = str(months.index(dateArr[1])+1)
return " ".join(dateArr)
if 48 <= ord(dateArr[0][0]) <= 57: paramDateMod = int(dateArr[0])
today = date.today()
if dateArr[1] in ["min", "mins", "hour", "hours"]:
return today.strftime("%d %m %Y")
elif dateArr[1] == "day":
dayMod = timedelta(1)
newDate = today - dayMod
return newDate.strftime("%d %m %Y")
elif dateArr[1] == "days":
dayMod = timedelta(paramDateMod)
newDate = today - dayMod
return newDate.strftime("%d %m %Y")
elif dateArr[1] == "week":
dayMod = timedelta(7)
newDate = today - dayMod
return newDate.strftime("%d %m %Y")
elif dateArr[1] == "weeks":
dayMod = timedelta(paramDateMod*7)
newDate = today - dayMod
return newDate.strftime("%d %m %Y")
elif dateArr[1] == "month":
dayMod = timedelta(30)
newDate = today - dayMod
return newDate.strftime("%d %m %Y")
elif dateArr[1] == "months":
dayMod = timedelta(paramDateMod*30)
newDate = today - dayMod
return newDate.strftime("%d %m %Y")
else:
raise ValueError("Date ", dateParam, "Not recognised")
def fillDates(self, data):
newDates = []
for dateItem in data.keys():
newDates.append([int(dateItem.split(" ")[1]), int(dateItem.split(" ")[0])])
sortedDates = sorted(newDates)
firstDate = list(sortedDates[0][::-1])
lastDate = list(sortedDates[-1][::-1])
#print("First Date: ", firstDate)
#print("Last Date: ", lastDate)
if self.interval == Interval.Month:
currentDate = list(firstDate)
while currentDate != lastDate:
if currentDate[0] == 12:
currentDate[1] += 1
currentDate[0] = 1
else: currentDate[0] += 1
if " ".join(map(str, list(currentDate))) in data.keys():
continue
data[" ".join(map(str, list(currentDate)))] = {"count":0}
return(data)
class Interval(enum.Enum):
Day = 1
Month = 2
Year = 3
#testing
if __name__ == "__main__":
data = {'09 2020': {'count': 58, 'articles': ['3a64dd115283c2c7a58f2d2f063ba2aa4c634b44', '53eb1bd184f161c7897940f63633e24a916c0e1d', '25ce51dfac49d2e500ccd95ae17c9ff697e7fcb5', 'cc831be5d31161cc26dbbf7fc06493a9fa27d204', 'd32c08bb8e94753b2b57e7aac8b8d9a1fc475c3a', '15a526744699bd6cd012003637b413e6e2ffbebe', 'e60790c385a05a1c845c38c019efe4eeac7a3fea', '96b6a719263dfd0a3a50912da8d8309c84b04317', '18f348b990751de81d7572f9a2bccdc202f7160a', 'b6bb38e4ea8222363ab8a64fa538a1dc8fb66165', 'b1d06bb133533aaf28d8bfb097f5e50f74d1190a', 'beb55b887497edece3372fad41a4cad9790d1ddd', '827c6de681322fcbddbf9a7f347b64a155a9a291', '01f4f559762f0de6a27a261b5ea3b564c99dc272', '7b9f6df9413ca18205cc1fc25e2982fc237f47fe', '31397e8f7ba253b6d9cdee668ee9c62dcba5949c', 'ebac14fa21c99953e4dcc002f1812f3a8bbf1e12', 'e5ae0e7023fee84cd75b62c9677b178ce2ff9e9f', '539c1b84d2645289e7de9ebbc3da500a87170588', '7b288d55973db4f76dc302c6c03bce63736759a4', '6b9e9adaccb46aec64dc3403703df532b71bf029', 'cbfc43e858fe277fd91a78a07d9ac23d011c00b7', '86f4079f30255d90d08428ac9768b0ee8cd74a88', '1317ebfcc8118abe656661b615fa35fd780670de', '98fb4780bb4a43c7bcb9e59f37c4dce8f239625a', 'bc5bcf1ddb2a2e18c8a122dc00bc16b7f763127c', '47f2b3eef17593151705917af6e757f54a2a9b0e', '63a46c6b736dd8cac7b244cd36045ebf834faf3c', 'e5a429ff9004291ac1b53a0baa487a801c387102', '271cc2e31e53953664080e4872edb1486afc9e5a', 'bba537f0644c63cf4c765f1729d4784a593997c0', '18f5b7989254cbcbeb9fb0edfc4242097bc08fb0', '89b85438d63ecf52994680e0936583db24dc9bdb', 'c866379de8245acccdff2d394d150c6eae6003ed', '6feeaab0de4f13973d9f0d403c790946a74a25d6', 'c73e7e41f24ff4ad4099f93df227cf0f771364fd', '519c9510a3181bb7a713670787a50431c17f7b7f', 'b024f3e316afb12ad7559a8c67de1c12c6b7d64f', 'f020473d66b5ae037828d9a533d5d6adcdcae1dc', '7dfc623db88a59793ea9023aebd27640703cee05', 'ad22cf0acaab390e32dbb210da330223cd684954', '266f80ad54f60782201805f37d383cc703e595b8', '041524b3d1e937364425e81135bdeb718a382606', '509d707b85f29dfedc404fa03c1776799b5ddd08', '9fdfa05a6f6a07a917ad8bb866d1e8fcad3e2fc5', '48cc2da8e4814a56cc1668cb69745edae9319793', '3f200ff964f289bc4de4a85a7fff78956242b76b', '269a712bd574684fd5b4f26afafa6fc01d11618d', '0db491613912a62960784729a517d8239a4962d0', '998e1ca2040a4f00996d89d5bebdb645f6ee7eb5', 'abbe42526fd0ef5ab6867a355c0e448f45f617b0', 'cb562c6c18fcd6fc7cd4b1e22092e3b21a1aba42', 'd9046033e2f5b914347ca9aa0e3835a82699c49d', 'b8c3828d49f3cbe2d382bf01f3a73f5422389623', '790820839b99f31077c14e65ac5d08d2f5958aae', 'dfb986feee85a9b36973b1e77fd9d558ed87a3d5', '8bc9bcbe8c7befec3cec7559dd03d2d94c16041d', 'b952d6728c1930477377f2eff0f2c2398dc5e959']}, '08 2020': {'count': 50, 'articles': ['55ce5419a869f78249791802a90bfc5655c5095f', 'c709831db17ff218c4dc19ea75f311c9e4540dc5', 'de3d3f23b7916f64c0d8f0838ca22e0a12abdcee', 'ba0733e4a85a750819583b0d306a10929e72bd1a', '45240cf8b127e97f700004e2062b79f0fb5a2dd7', '56200375bae5f830b56f7d6792b62ce52b27dc07', 'ed537c5fd68c6b0a84414839569c3e09dafa8adb', 'c80d91cc14f49a7208b65e62883be726c541147c', 'c3fcf051cb825ad437c2ed448846b100e1c66cce', 'ab339c8d4c38f1f17c85cb745a5142e7afa1201b', '7cd2ef5eb251bb54dc07b6fe8bc54bba58ba3ab5', '2974b8098d197572799addd2e412fef3eef4f9d8', '08a0ebb377f2726066c2ea66b285dd1cef3d7a7f', '5019cf52d27ab9e6c404b8211d3ab57a23405ed8', 'ec4a8b0ff723f270fad74ade4d0f4ac2505842fd', '2c901aa01e0e1ff0a2b6800c02d82f139ba6df9a', '75d2cfd6c6df99083bfc52cfe7e6eea51dfbd96a', '0efaaaa3cd9705a41ab2f904ff93e788895fbc93', '20294c706b6fc0cc74644f3853dcb3e2ea6f0539', '565091685eb1aa6ff0401fea0fc98fde0ba6caac', '464a0ee46342c132405cce03bbd1bf10f51e90a5', 'ee2ac749be8616a9eb190c58c9d258b17304b501', 'c71ff3e4eacf94dcf084899fdda92b7ac78c5c09', '2354dd690332f724a44f874a3123af92c11986f2', 'eb34571ea36b6e94f0509941424cc973d4dc6f4c', '2685a4d4e3403c6176f1663af7b3d53c3fa9095a', '10536474b0bd8283f11e097530526cae8d65016d', '93ba6ce627c8beb9eb8ac28aa91d1b39260fbd89', '5a9731aad039dbd0be8f5bc17458257f47762916', '2a16c050b6e20203de917b8698f1b48f950d1d28', '0751a5d1b90d14e289aaf65bdcb3ce73161719e1', '0094a42f9aadc1986af160ef7e1c187a7cc403fa', '8acaff8264ddca297e41e6c74dd4586f11690049', '8e7d8150259d190afbba235529c4bb502f140c95', 'b1a282fca04cb8fcc6df76be443f319ac88cb419', '286eecfe13129ac5903fba24e1c4c2a1b9f9364e', 'b2f9016fb2eb419e1e54fc71030ab8273919fcd3', '04f07e10923cf9fc06197a327e7c7727a009c9c1', 'bd678013d928435b747fab1bf3cb7588e918f64b', '14d4c6330b6bba0c0634ce849c08c8cd0a4ec143', 'cb677007e7998f8eee9f9ce7888e571e57542b1d', 'cd3470f29b4595883c4e3baeccf90e8853633931', 'e50f636a8fcafc30a4b034f785fe26dec321faaa', 'c9a99d38df6ff84063e00d38f20344d836b55227', '4b97f8855e46efe7d99b1b4096cb2873959546dd', '71c343df24b432d0f5139d2d8443210fb7ff7589', 'd31bcb84ca22bccbbfa8a574e7b0e64c33e34569', '2d04a6603b65f70e18a4fc90a354365e03320b71', 'a4281753b5269bec41354a0d4db3f68cc6e43716', 'c5286d87843de8bde06e7f947c9fb9158c10b71b']}, '7 2020': {'count': 30, 'articles': ['311957b877d68ff0d5661b1a8ce31ae0f02e2f18', '924b75ae1af37db761b75c6af337f38735cd8365', 'ee00cccfccbed0b09c26778f3ad16a7106555728', '48e9e0e5b8bc02b1f3afa777a8234ab5e88e1e0e', 'be5e17b3399424572648dec212c51ee6d6d41897', '7272ee7ccbdf37a92fc5402396d83a102688446d', '4c2ceb5270084d34d92c888d11c19232682b4fc6', 'eb18464ae5fccd9da13bf8c0e51aaef9485c294c', '42035ad196b2d55a990062ab5a25b097fa7121a4', '9b7267ae0d9e5d46f5763e989a0b270569aacb7e', '2bdb90ee6ce36303098cf74217a366d51408f9ec', '1607b1d1cb913d6b02322ec6749de51e6a00fc82', 'a6abebad95fee2147d3ff1d016862520c475f649', 'cb6fc065a3eb1e7d73d0de72ea568e564a7652a6', '14ef94b48750af9aaba9ed7014efcedf7b08b4c5', 'b54346a1a34905fe5b0ae8f0ef23660dfe2f11fe', 'ac09c6957cf5165fc57a3072b661c332aeda4890', 'abf6bb25f5529aa780e816b73439b272188b45c1', 'c6851663154fdd9e50581ab9cba6c41f5c4dda14', 'dd7162d86d46899030106b20f51733570e815998', 'e40af1a11d1b15208bef3f6725b4b52be2169625', '0be72e9d355f02111d1e0a00d5ee308d18e0380f', '6dad80f33b71d7780045ca98a089da505e2dabff', 'f95b7a80d2acbc2c88600861f73cf1f4cf905b87', '0f54f34c5dc367112cb5cdb47f1729b2f874e783', '66a3d0e300ded7a641e6eebef9067893556fbe5e', '66103e8144752fca23b9aff29ae001db4421da41', 'c5ea5b21a4a9c4318c6d7725b39e77f4dd43a2c9', '188c3fda3a046ab418fd86710e7dcec95e53f98b', '4d552ef24ab9f90b30783f0c06c6308b74c1a9b4']}, '4 2020': {'count': 41, 'articles': ['f4938559e3b5b6926abde3999c3926c82582ae0e', '7c4f3ca2563f2df8066d2205a73da6c8c58b09cd', '9401300d9d5ca43b830e3a29adeb36ad1b94486d', '94f45b1ba01b399734aebbb1a08357487c9a67a3', '1f20738acf75a68577e936f74956a9157e41392d', '214edbf9d86e9eaba2a2622de487005214840bb7', '17511886cdb9671501798113ec4c4af245f2a06c', '5baa7bb20cf32b0603c6ca4eb5fb5f99961d7322', 'e74191a07cd4a7fcd97ce92a457a1aa22b23bed8', '4681c69e15b61b4520209a6420d0f84f397283cc', '913f5843e4987f934a9f35e94152a7c3baaf4fc5', '28a79508b965865f2efb4d378acd9be0ca44b85a', '0b8955791a16ee37efced15c4de399b3ab0242aa', 'fd55e308f5647c37eca69b9c0dc3ab19a2aefd1d', 'a8934c3d7abb1178f1b0d7dbed9832365aea615b', '37e49a6b39eca2fa836def1f491925f53b4a2549', '6c51ad96b920fcddfd988a495729f34e0d54b16d', '78abea9fbac28c2d36719b3e12cf40789836b55d', '7bcb7b65d4e4c9565d04ee5e8803c854db74eecc', '31dfb808d40d42a11055bd49da3c72784767feb3', 'c56aaa3e15eaa58c910a85b52e5d40886ccccfe0', '5df2b06640de8777b0f4d75de3ff810912f582e8', '3a06a3a4233b7dd83a412fbbbf7b0fb52e50a172', 'c020998f34bd9af20c81af48ddd62195ab1681fe', '06e4dc719b7549f23ed14f67ebd6a0811739799a', '59c7c34d057320102e314870d00dee5d753cd720', '49ff6f54b471350424e0948ad4661039ef143f86', '554df8b7ffc9316139fdde550e31af910fe1599c', 'a9f25e6655e5c4430a8014b0186f42c36fde5a57', '2199dd4e107e13bf2069d9c2b85271ed0ffdcbf0', '7054635b3b266b509f079aad11ca46cfa7b4eab2', '20d9ded02a3f916bb977f06d321d8e0e6e43f41a', 'a09fa66baa574cf0c1ab118dbdca49371db0962b', '032e045a752db83da21fe9d800982fce0e88c7db', '9680a26f78316516e050a979a98190bc946bc3cd', 'e558bf073c668764c6d8fcf33a2ee29908f2d854', '3847fe6d054eb6875097007628136e77e9fa4404', '6ef87780d9a7ddc91c5cf4af5bef063815024c28', 'c5522363c78b58a06085d33f3199562ec105b4c0', 'b4c92724b47ce9b7cbad1ff13808cac9f54988b5', '243d7107751f4b7e245b0177b1b2b085484d9f01']}, '2 2020': {'count': 31, 'articles': ['a2d35868ff522d448443b87584003fd48eb8efb9', 'f50f28ff10f1001742d586c10cfea56fa0ad2ef3', '1bbdec2c185d322c67351105da3457e6e2be23a6', '93bcf3cee694b4c2718494c12f2271bf6f8e1abf', '00db197abeda52a0af387f3274c343ce39f7ad99', '2331d06522925a11c2808fe265aa44accc3ea34c', '238a51476714968514f257c04a09906797c9f474', '6c59fca1c86f49cd3003fd7bbabdf4a5f12b6078', 'fc061d6a448f8bfe87e2dd8cf088f18786600dda', 'a44fe5a50927abbe4c06c02f8f6e8232a9bb91ee', '605e6a2116d68f968930c3015d9373692a8f534c', '51c30134be8eb973333a559901e3ecdc7a39d190', '6ea0499761a14790257462a10ff60140657f6095', '7d141a8fc793484407a6fee1c4cce801929944f5', 'c68f32db85624c55591216e197252a5e92de1606', 'dd64ea8864b8fc8367ceb938774fbece9b0c10af', '5e3c904f0dddf7b1568885a9d494b8eae72e0198', 'c89c945a4b300ea19d191bc1634d3236d212eada', '8f9ae0131a71e808eeeadfcbc3b13524f86c7300', '9293d15b98b297136a256e2a4576291a50ee220b', '76dcb1fe7b9c46e72a2fc201d454c2467fa55773', 'c8078450ddc3fbd9b0d852b45e01712b2899b8b8', 'f759ac42dae205c541afb670dc786e6a865ccc72', 'f0347a7973829fdb77574b0c03bc5338fa67ad22', '318d2d125ca4c725486be8a90db096bee75ec46a', 'dbed6dd2d1180a0bb7517c6dffd1ba949bbf6d32', '903414ec380511c4f8db499d86191e20bc617703', '9c5567b0d59811b958ff5e6ac0318549f1c4a6fa', '528943f471cd6a4c520a45c12096edd967a36485', '8a3d17135c4dd1580b71639890957e6e44b61428', 'beb763c2106b4c252418ad5a28bebda2dfbc8e2b']}, '6 2020': {'count': 45, 'articles': ['d497d3a8a0e7b6da76338cb060edb406c0bf5aa1', '716ece2705629b68d6077f7a8eeeef5558bec3d8', '3e47db96097e83fade2dfcfe0fe3f9442ab3cd29', '31787afc758944c590345d5f0d078cd034345afe', '9a210dce099be5a3c5413a17f19cedadf1bba36e', '0f4b3b398a64f619a24c6aa4e6c1542c12fca4b2', '2e3e3725d1de0d6593e7b36d9474ae4122abe1f3', 'a94b5e26c946a80d00b2b05ab4f9343a956f753a', '045f2de8aa3960be37cc763f35edbd40cb0f162c', 'd8053aefa2e11eff6c8f44d1edac73fd3b585241', 'e09000bd84e12c87fa74a2967e92edb793df10ae', '854fecc15e35b299cb494d6b8b45ec9724f840c7', '19b690ec852d562ad26b0f7f29b0df6c9a4304f2', '5d63ec02069f296cef29fb68a92b8edc3b8a4cc5', '32138f5cff393337a6abdfb536e20618c869adb8', 'fef61363cdbfa754d60596d2dada1f480bc53e36', '2312ab194434284191887bc7882cc9a3a50beab8', '676b43f066b1f6ce5fed94dbcefd7992f77fe1b6', '0cae45ba879b3cce3fd78c391511a5010a749986', '511e454c06aa76a2373bb05291abf53443e9e16f', '93ec81785d14b371268def398c3a810b37a46699', '5a50b3749b69d3f967d5eb7030e27cae33dd5aa2', '392368f50c57fcc001ada7bf311b7bff7bc45ced', 'a78d30f1b39720157ed2b0bbdb8b17f509f1d9dd', '74ad3e6eb584e8c65030ebf38979732bb960d017', '8334978a0e48aa08fec0c33c968a76f6e35d1960', '254e02d943875f19f5e80169b2b84b95aa0d8477', '41716b1e52a7a651088ee2b70302b7b99e67cc1d', '63cab8174ff587a2214157702e38e0cb50881601', 'f8ec5065618aaea31252704b7098ab4824355816', 'cd42c511955615a77407139a986e652deb416177', '89f62f4a8bac9c4daa4157ed53b47f3273d78fbf', '18f522674d190df94afbc480d1c7f4e6fb744b3a', 'ce9806d839e042fc51f16d26cc724b61ef5e085b', '0656e55776c5a4cdba704ab23c936b4adfd0ccfe', '7ea03818ce612883b9af082473a135a4182bdbd1', '49342d6154c2e20db1a372170f49aa421c6ded46', '76e635eaefc632d677db8d167b91987745dd66ca', 'de64325be93ffad0e4f39956cf6de784b5a64d49', 'f989d1674c19c873587cdf267c425b7f4fe7c695', '7df8b6152b84d9b4886b7599ccb812ce0133832a', 'a7ff3eecc9180fe6886d7d898bf0e69214ec9d19', '6ce5990bdb8e5c1730aa09af7209de9c5a1996c3', '4d78c2c0d2241b32096e9fec65ceb0159c127b3d', '8536ef6bc5e00be955f646f35b6e6006767f4666']}, '11 2019': {'count': 26, 'articles': ['b6ea04676efcffe0c878dde5a7f2f94ef4360072', '2fb0a5c7c204d583264446f66413fd6f7140c6da', '507fcc3f0ad8572989adc969c7d9b6706f24ab9e', '8d265b6273e711ca03cd24623d6f0b4625a3a664', '9add2681a990d7daff7e2c27b5db1e29324f8db3', 'fa9311c1d05adf7aaafbbe21a6a62bc27b186f83', '8b9f5b8a69a524564fbbd3eb5e3c50b80fa911c3', '203cfd6480733b27c637846a1d14ccedf713d4f1', '8aef07564061320efdd97bc22e4b0b3a96a6b013', '6e0e9c71b9f250bd0555f3f55d63ba8b2947d514', '9b5f1ea62fd63add4461f313bf63fcc6622a1ab2', '708eb9da2ce9ea50940722c4d04400cf1ba462f3', '43a47927e8542f631958de2a3e8d5759e2adaa84', '2acb7f362182954ba50f0e15905cf51148bf60e2', 'f24e0c72c3acccf5bf5ff67e4f697e9cc6fb24a9', '04545b8ecdf73722e298be26a84d15bf3ed948b7', '6962c472503f349fbc19ae58841ab6b060bc685b', '13e3e06334dc30df86d6b30128956a662394cdf6', '179d3ae65e4e7cae8368db636f620826113f5fb9', '72cc285f62469c570922e8c5335c60ddbaa94f91', '8a7f79276cc6700a76a2dd1c3ad35517a0ad31f8', '48dd8f5bf981af5db307f14fe61f422524984e1c', '49a56b2cd897e3273309b33522a0f875d08d184e', 'd1f3eafc958d3c9e078e56297b9b61c302b8e480', 'd59b38f3fcc4f6075a5a8b60c50bf09bf0ff0d34', 'a99f7217d7a508f7a280bac94f66f57cf84f7ba4']}, '5 2020': {'count': 53, 'articles': ['ada13aba883d250144633120efe16154e248b6ef', '34958051541ac4cd7fc08770ea6d5941bb86c6f4', 'f1a035d15920c41fd0981a592daade3ab70cf592', '19535abaa458cea0966ebe0d4891848dd85c43ee', '4b7345f30002fc030e9e3a4d66e81ff9c3e478e3', 'd48e726c180a1950dc16ec588488c5c9f10365d3', 'd77efde696cb4d6cca4e671f4a27d399d669b792', '800b5e9ade747096933c5d931f76c18be5d5ae66', '73e5555d3a27393d185ce9b05345d3de5cd21c5e', '91d2a09299a65a4895cda2a9b158566ebc114182', 'b8dd81c5fadd33197e8ad109ac0625410e967905', '8cfb431134f89ef529ec6313ad7ec4904a63e524', 'a14d4831e60f2587ecd42a94b77cc525f91d19d7', 'a2bcea0c2a746291fff47b88eb0e7e2af6e8a276', '606d6a8a54b26e161c53ce23b0797ae2a06c5ee6', 'af2ff1e490c818f8f6029288441a9a6036610fd8', '570bd446ce9ba8ff91186c0c4e2d2ef8c2f9e7f7', 'a216ef96e882dd25ff41b65edd9b0f7be60d6302', 'c352076c5a7d6117eeba3d86f247c7fb3dbff042', '6fac269433712e6975ad19678a7b2ac54fe67fce', '5cdf45c8c7a963af9d09ae7d8b29bcc93a4e28c9', 'c7003eb1f974bf4f1eb29a122d6266f8b71f7b95', '90afa2c74de78c7eca742bb1bdb739d10b813cbb', 'c10a66145d39bd1544ef6da41fd171c81e903a5f', '50bb13c311fc408b35d65b6190e482019fad4473', 'a25cc66ce2a50c8e4712a163a6a9f7ae36484430', '2ba734e9234d21c4102d7f27802914b60a589e2b', '300b493f47d5438ea3fde44086a0f2e2e5461009', '3ad7ba9dd5f37de1f593faab5c92539954146fe5', '4f5a78599052a818675337fccb0f3308e88deab1', 'c594b22fb8a4c70ddcb652b58a79a03c3d5225f5', '9c8b9f3b971cb9b8f9c500821309f7c6c64169fe', 'b009dc75a0718845587231a133e5e20cdfb7284e', '25a790f041e218fbcea4afa95d92b88b407f7f17', 'ac115b2981d94d0fa38d5d93dbf7a3e708475271', 'd584495993c19289ef87fed9927ef8df7560f6f0', 'bd988361fd029620a4bcd7666201b3e0e161d6b4', '3745bc8e925bcfdfd8a6ec0b13609444560f0db8', '1e6c7ef1acfb147efe8ed571c5f114d6f556318d', '625189b308a7571e2b0f9e932713f33007acf74e', 'ff6d17f63d362402118eba155a96298fe48eefb3', 'fb1a0a722902288ab9aba95596e1ea240fb6d079', '3bf2811a5c40f6e546098a01c8895a1a202bae86', '63cdc5cca8933819b228d20cd5f8de744e41c028', '51c33e1980d45693eb8ab83ab9a489e13529a0bf', '624fa5a8739f11830766f873e5b3025ccd093a56', '0c8b8a95f42dad48e4e075d3e13536e6a85f72ca', 'f0557cc5aa631b889fb3a387472110fc3db92d85', '605097037bed39eebc9815f06f621d846da74c52', 'd174018a597735e5cd7798b57b532d3a71c397d6', '5bc0b13bd511c34808622b05ce0ef8166e87ecf4', '29e08f91c9e68690c652718fe9e307ab1b16ec95', 'd656b2823d94be4a6962a4d75ab174c04b3685a7']}, '3 2020': {'count': 37, 'articles':
['c1300bdb29cae367c3818ae9c9eb07aeb8967114', '44673abd03c02fa58e48374a44675892e570fdaa', '66c2702bb510bd581164f6eda9d143f5631b3c65', '5fda9aa1d931fbf8c821210ee00da58d7ac67410', '737f77754536fa7659975505ca07f3f58c8b621e', '338c00dc30bc68fd95b2bdfc5c0e70a5afd7944c', '7aea326e3a5bbd708a72a7ad64893b7fc0c8195c', '45b5712d50b0d77b1b32b2366b51d2e886d30e33', '1c58bca5cdda144df6fa5afd9b528fa5f8a98af1', '99fcf3670384816bd007acd2ab36bf75d1b3d89f', '880293f73733c8efb3c1a0fceac18b61edc88f1a', 'e9959b943affe214a6d2ecc4df83fb0e0ff0741a', '48d4fe3386aa1bd457b878219ad437cc525cb66e', '9007219bc21aec23cabb60d76f47692349ce7fe3', '1b9433ae3516e1f8f8899149c5c67a5eb0e074ad', '5d2aef383dcb2adbe50491a90816d2e7742b66e9', 'd69b044760c610fb798a0fe2e43d9ec38c0fbfe3', 'f149638419773e760cf56d636c91ce5e5cb764cb', '1315c241d9043196439aa23d4d00ff642103c528', 'c2f536561c6e8bb3787a11cac2fb6e395b94a9ee', '069ca72a9626802850aa23976baf63a416a6d26d', '6a1911e9e99444959ce43f4708d8e80462973d9f', '67f264f5684552b2236fd1fc3d0538147cd0fa6e', '394e515bd230e3b8b9eb6c91ac933fda4da01303', 'c02f9773232bfc17e12410c6af8c59a1f322b936', '32ad94f3fbdf609d3e273495959a496a7665a792', '35d8be6547f99203f247eeef354b3cd60d134226', '64bd2a43256e266351467991928ead787afc25ea', '87eea64398bad89d8b48a911ba60b62329e8af42', '18e9b7aca15e0a7e2df84163b399d09701b2eb72', 'd641c04779112685b357f41788e97580bb2d53a7', '23159bcf2b3e643b46d7ecc51b037dda85f6edb2', '787a4e4ee1502027e42c7b3e61f75fae61c935f9', '4add08bf82495a286e766d91b9fd486dbfe0da86', 'd198b32f11f6977980a42078607cbb998a5ddefa', '230c19994403f3084bcdefc0dcb5acc4808114fe', '6d2983cf490e3f6cfc8584f9b448d22361e185ad']}, '1 2020': {'count': 39, 'articles': ['a905ec06b2dff87088f2d862699c78add14200ad', 'fcb59e911b069ac6251539d925adff7521a2fb7c', '911b31d0ace40fe5bf77d804c34e2e3f98727d04', 'ade5dfe006eb8a26f81d6663eb10183b814f96d2', 'f50f4a73cbbfaae9df576b1e3ec965b442d65532', '20a3a29136ec7b7c6060bbbdea3a8de3d966a00e', '732831f79d789ce4e8bec453af548f3eb0d78d3f', '0bd240805ddaf1e6500384d55683cc61f363d1ef', '7f014a4cb60625c6e49b80eba3d17647f033e84d', '6afabba4cdc0327b4a4af6d0a509af4a72291893', 'ad21c8901f8b4e7aaf14e7fea6d44412c85899bf', '0f614a6a8f3e77545303f935d320ea4887ab2e30', 'aa52592bf1c19a5df1a05193e8c77539a104b6b0', 'c9c270bd3fb8549b275e975fd9cea6f0993d01d5', '2abad4905825216e0ac9b8b283479c215568f89c', '48ea8f02b9ea510522598e7b5a78448381571f9e', '4d5a75a23009b194550f292aa86995be01f0ac93', 'ed64a2b31169c51ac96bf99ebadf49e1a9604b86', 'f98942f2aafc4548aa4bbafa35023e7d18b2a1f8', '5f4f698309137a650565580ba046cbad634a6849', '6e901df6dfbf944a3e2cb24c2ae7088323d9f1ec', '621a1016061e510f43c306ecd0f2890e76476e59', '9294696925354008429ec1399a9317be1e476a49', 'a6a3aa208e7c918e76143be75f6f0ecd1bc302dc', 'eae3a94870f924775671cf9311bf142b413a0002', 'b6dec43c1b1193ceb7257b8cbc2226d34e385214', 'e16808e34678a9b738d67e21db70c2cf114f5631', '0b1bbbf6bcf3bf8d5851e3f2d98ee21f06eeba87', '4c3cdd2c84916e3067ad9c9515da0ebdeb841438', '04f9bfcd0519c56709a86a8d2e1693701ff18d9d', 'af6b6182ff21eced052200ece0ce427688b147e2', '131793560588aea53cd384c6deb43d48943b8790', '6904281608890a57f9652183f83ab891845a83a2', '3f084ba5a0701b82970e34faacc4abcb87668435', 'd124232ce9fdf50a8f9ab1f380767b0b86cff2d5', '5066c32407263db6ed8e9f47b8f6fbc7b486e5a0', 'aa692e76121fdcdf2b63c45c187f12a8a5d69e33', '9e4b7349e5f67f01d987db62810604582242d15a', '58b011ca7489614ac82d8172dd816e16a9c4f126']}, '10 2019': {'count': 22, 'articles': ['0f42ab0fe0d45c28fa07fd6c69866c90364a38dd', '8e3753e271245ed389013acfc94e25711635914b', '54f4d1e439a1afd355871a95aa131ad2a7ec4b7c', '0806e59df1cee4af955f908f64e413deb53ef310', 'b5cd32f011b1fedd0b59899ac0c94777f9cb6c1b', 'c9dddcbcacca47011db0dcf73644aec3eb666f24', 'ca500df89803886a1d3a1247957e865f3d9240cf', 'a88c86e8954c84e463ffce688fcd34a33405714d', '2e4a3797b126a28827526b8d19d1b8ce404047e7', 'b08b8e7d6015157e72fd20452b849c702217c424', 'bd6f676b927c54309132f089c568483f68133ad4', '4264d31143d1c5f6fe0e4868fa1f07b72700196b', 'c21ab6dd6a780c249a68ffaf9bb20bf3093296ad', 'a8442866092e848a2a7dfc36cc543c26fedff5dc', '2149cce965a0c7fec34366d120a08320edc19479', '8f0023c52b55f3f079fd4ebef3dbb1ce8eeef00c', 'ce8e984d1c629e1af928d0669bb942ce42570754', '10745793535ec7f6a5ee7d0420944d239f71246b', '33c6a9f670133ec05e9abfa4ff6a081f96e98c0c', 'cb60a3640a1ba9408e40f6d745081dcc2a378f84', '51a97f9c350fc180121e737f73ba2aa332a65bc5', '57f6063a2f624be9d53dc9e124c988ba10787380']}, '9 2019': {'count': 21, 'articles': ['4d832581321e6ccacf13fc704dafefd7d06327aa', '364a41cafae87b841757551e05c94bdd84c66e12', 'af2aff64ffc3d1a9245ae019177fa5e163f1834f', '680275e2ad6c5db530d62b452fae9f9aa78cd785', 'a24242d358efca209af7665cdde582a7f99df0ed', '19d90eb12fb9d2b484f6408aa5fbef031529fec1', '59e02eacc469aed70c1b640ebc0a7c2002de5541', 'b27caccdde40a15e2e16c77c71b7305d87b97107', '41927fcf3cc8e8b73f393b3d6ba15153b1ae9d5f', 'f941a82fa91ef3033a1f9de5d98b63f4be8d4878', '8cc4a1c490fe1a2e20bdc000244478d3e4c0b19c', '4af15a5734a3755e6ccebe84ef352a52aaf21c4c', '5caf89f421f2f94599157a1991ff53d4f6a6cc50', '203b665e0d8c61414367ecc8a6198ad15e108383', '7c4a41cf8fa1b8e7dddd7a03754fc2786762c8b2', 'b6dc599da044966c955c43d70c9f941a7ba22b48', '0ae0cdcd3467ce114cbe3a526f8df70f307a723d', '1f700ba0be229e70d31e4fe9a638ac95367bf055', '81e1bdb9aef39ec524134e52db4a199edb68f892', '93bb359d4af78846344ccd85d7d723e61c424b47', '4576145ba1b616a0f2dda9e245b51fd2947b8ac5']}, '1 2018': {'count': 4, 'articles': ['65f075383df15b4c4d113d274b409c555cad7c68', '0125e7a51905cc5968f7bf43d75df8639c73bace', 'f0e40cded7073261940b3ebfcacd676a9343e44d', '03849d7117b87083be905d6714b62ff904435e52']}, '3 2019': {'count': 8, 'articles': ['0611f05c27c14e18c11a5685f2101ab139c63eec', '1ef3fddafc02a8a009942cebe01c26a90cb037ed', 'd46d1820f82ddfd44c1c189339ba8b3b090c2146', '3cc9e38b942e898eb6663db2e5de13a06f085430', 'd29dfe7eb5088c2cfbb961191e283c942d7f491d', '9a537d8f6333cc23c9aaedb3ba483de519553b57', '2a5329508d3399e1ab8aa4dd331c300706a9cb1b', 'bacc4a459d344bcee1b3bef0e48e9f7c90ead952']}, '8 2018': {'count': 4, 'articles': ['f7cb64d50c7ff088bb497b5db441599c43b7efd7', 'ae12c4aa6cd008e33ab9f0556f1869a60c6f6274', '98457efbf73acad05f64fc577d40a2c9eab30e84', '45a02cc59a6a57bf6b8532f6b19db4f14f774bc0']}, '8 2019': {'count': 7, 'articles': ['30a0140bbc055a48870200f850364283306e4a47', 'c5fb4818706612bc96cec0398d0103e045a9e339', 'd1daa7a5f41bf9df714cd7196d7c0d8d9f4805fe', '6c341544954f176578944aca929821c5e3117229', 'd8835beaba6f131ef63f9b84d18de0abcbf7c93b', 'c079f451720d5b456eebe3e9c23a7b4431fa4b4e', '28fc32dd60e811fd798e88f0da208ea4f2a6d06a']}, '5 2019': {'count': 7, 'articles': ['fafd7bb2c03c3394d23bcca6fb7a717defa7c7f6', 'd711705163cdf7cbbbed6b3a882436ff8a5da924', '87606a7565c36efbf0777522a55b2ea61a4da1ea', '488302c6f1c05676a91e66ba0ee2680d3fec2cae', '048cc72d42a2105c6049e0212a20f5f86fd4322e', 'afa0298d9bed814b4575ad52305a6bb7dc0b4a06', '85738d94ecaf85dc041615562b8492f1a71dcb3a']}, '10 2016': {'count': 1, 'articles': ['8ff3d7df6316f72b3b2d7e817e825ec33906252d']}, '12 2018': {'count': 5, 'articles': ['14dae7abfb4d119c30a2bcaaca4bf50517c450f6', '93b7b8d255c6aeacb2f29a5078d5ff81378f9a3e', 'd961d420ffd1dc561d47a0c445aa72fa6e103a12', 'e549c3ddb51bd0451324151f99b807ad4e39a032', '55827f9581acf6384fefca71bd4133cdf3d5a3f5']}, '7 2019': {'count': 11, 'articles': ['15058498821e7a6046266ba7014555f97a817243', '480b8ad83da9b14ffef78d1a63412bf17980aba8', '718d862be23c772ed5e4273a1798d375bb0b0b2b', 'd6426167efc731ad22b957811b41763132ed1209', 'ea7749bce326c39f961cc5ed69c5908d8e78db57', '314993621b019072297d9e6ae7db8041cdb32683', '8a474a4c805cbea6f3899ae81c073b1f3b0e4a22', '9043444b2e1bfe956a1fe628a3e1edade4c4d841', 'ebc1979b9591bbdeb9a2aa282f81aa1a24dfb110', '697c5ff898621643a11581c0d9410ef3f4c61b8c', '4b2ce21367df38c449f22625d804274d1c963057']}, '2 2019': {'count': 5, 'articles': ['f31986028b24e382ef98af03b3de0f874465d4ab', 'd6c97bcac44fedb50176c4ad63131879bc432911', 'cd317e921266e7b04c313f9afb83450ee39ee152', '947ede96d5f686b5f58ab2fe13ef6ab6360bd567', '319f01279ba0bf95c32f764637016e3f21d587cb']}, '12 2019': {'count': 24, 'articles': ['78d939a0c7aaa5ddbb2397972e9660480f385981', 'd26a77ac54c6c15938be16795df3624716598ce3', '3652a3b35492c6b2dbf1458ca04bc0281ae5f27d', 'f6726f03504e79f332bf9d578e3a7fe999a673fe', '3aa03f436f80b6ce00daed2e16073810140082e0', '6e1c0111e9919f314fd927884491b8253525adb1', 'ee4687d695375db441d044ccab056e2afdb83206', '835763dbc5048a01a8841f4cb6ec6dd360233508', 'bd7d195dd30626b4a080f19b44bb9d699df61afe', '8962ebcf118a8481ae0179b7c46f277e7ad264d4', 'cb3841745eb2847558fbb07cb6cc52c28c9cbdd3', 'f8fca5a247308c452e9e990d67aeab12dba396ac', 'e7120c4c1add807234d374486465198c6050242b', '4a6551643624a24eee4358c356f9f57fc15cef40', '714364224f4bfdae8cce28239a4adfb85b063f6c', 'f6aacf4a65d03696a942f0f0d21fe022e8056474', 'b7c7caa435194aa9d3a1f7597f78bbcc2bc94ed4', '84a766c38062b86f22ba3c3973796a5c1092bb85', 'af77950a8cd8866ed1095dce3ae33de6aefd5de8', 'b64a96d9b85e16ec022b1902ad16a6a04c6f9f1c', 'b03a4939fdfed597f8ea193f4da8ad83d6c1c450', 'f53b6b9113bc4523c1196e3e6ab41f73c82dcc98', 'cac7d29304c1427d628ca5e33c9da7d8bc0875b7', '641e34fd52b88492e03a8c03df5f4a2c3fe845cd']}, '4 2016': {'count': 1, 'articles': ['3943caa1b7866e728ca570d33d2d82a8205fd06b']}, '3 2018': {'count': 1, 'articles': ['7a5d586d2aed9b0cb903cd33e261d1021edb7b4c']}, '11 2018': {'count': 8, 'articles': ['be064cd5336bd16b67fc920d25fb171ee996bc7c', 'c54949a95314d861a544e472d1f2f6bbbe117dd5', 'ad92b52ec3e52589300183fcee4908251e481c9c', '631f23990e89ff18c93884f2cb0c44b60c848b4b', '654b1dd74ccbdce942ec0cae1bc134449ab6744d', 'c24e31e0ccc691c0b0167796964b5d7802d3911f', '9f9cdda1cd2af3ed168e587c09eb63845405a24f', '3f7793f8a72c47045b3b54447c17bf3fec2343bb']}, '4 2018': {'count': 5, 'articles': ['6d226cda1b9ea8085ec8a013b663b1a9d2333cb7', '2a15fdb8729af2235aaac76736519aaef85ddff1', '0514e29bcea5bd59f325b56359d1da33a4e1a93f', '9889670622fab996bdd772efc9f13008f366fa91', '0515246eb356e338084b6a2869ee884777884b96']}, '5 2018': {'count': 2, 'articles': ['125ca5053066848b71e04418d7cce8d82b7f9c46', '64127b670a14cbdb989f230d27d3c517feadb525']}, '10 2018': {'count': 4, 'articles': ['d0447329a160f2318af291cb9a4619558898a36b', '836e5b0b7ac7690503c3f7985ca068ca39ad5e1d', '4e42b1ffddc80a41e562d53899993bd2b07adde8', '5719e39b80ab2700b697732a039755aa0beecc21']}, '4 2019': {'count': 3, 'articles': ['d3b8bb4c689b1b4b5cda06b3f1982b8154b1ace8', '4f9ca00040e1816b71139e67d7342a8f4bf9bd04', 'aba35f3407bfe96152df20261c6ee69937cb78f9']}, '9 2018': {'count': 5, 'articles': ['4fc4be9d1d6c96a8e9032b978b5d8d38faa4ee29', 'e28dc8b1ae566466453aa96e8c7b12dd1d4cab45', '62cd254b63d45912c08f3b3b293509a0596189aa', '06c49811fa715dca592043ea2ea48561d467a2d5', 'a1cef68f3473bc778bc2f1a08efb253125f5ba81']}, '7 2018': {'count': 4, 'articles': ['02cb643c17c8bbbd71940e17d11ab3fa62df3c76', '7b17ab06aa2fd4180f13ec5fecb2adc694bbf2fb', '4ab6098d91f56a2f7ab2d0ed8dd7555a0cbff348', 'd8085e71243a21d6d49c37b9874ad7e53274a755']}, '1 2019': {'count': 5, 'articles': ['082497eef253f94439b41bbd49c415eabf0d9d94', 'b04ea432ff062548799fc1dcc0ece98dba901a7a', '448d20fadc4ad7f6c868ddd76c02551fa9c7848c', 'c9cfbf0765e2972a68ece3eb756f606de05bd28f', 'b23d3eb104fa21f68d6556600393d69ac343df55']}, '10 2017': {'count': 2, 'articles': ['bbf5e1b6fc543a26e60d15f73ac6df1d72efba03', '541505ef0d424094410c1c17f1fbfba3c26dc494']}, '12 2017': {'count': 1, 'articles': ['b377c107df4306909a9b427c2bffb844c200c529']}, '9 2017': {'count': 1, 'articles': ['114c410e0f6d4e05d44cc4bdbbabc80928a52461']}, '2 2018': {'count': 1, 'articles': ['8ad87a0684c7a3cbcf1d49daf2b658254128cf98']}, '6 2018': {'count': 3, 'articles': ['d769df447404bdd751ad582031a92844363bd37f', '1b1b8ad5957157a5975f2596e85f6fb1811919cd', '9e0a495481f911d16cd9783642543a6a2be60f06']}, '11 2017': {'count': 2, 'articles': ['acefe277559b00ec9d972ecb21e7e534393461cc', 'd1c711f89d4bb0a765b4bceb828488bc8f458a91']}, '6 2019': {'count': 1, 'articles': ['06688d7475fdb2b72bb3c46fcf5ca134fa902edb']}}
catalogue = Catalogue(Interval.Month)
catalogue.dataArray = data
x = catalogue.fillDates(data)
a = []
for date in x.keys():
print(date, x[date]["count"])