|
|
@ -83,7 +83,6 @@ class DiscourseModule:
|
|
|
|
on_page = len(topics)
|
|
|
|
on_page = len(topics)
|
|
|
|
page += 1
|
|
|
|
page += 1
|
|
|
|
|
|
|
|
|
|
|
|
print("Working on " + category["name"])
|
|
|
|
|
|
|
|
for topic in topics:
|
|
|
|
for topic in topics:
|
|
|
|
# Increment total_all
|
|
|
|
# Increment total_all
|
|
|
|
data[4] += 1
|
|
|
|
data[4] += 1
|
|
|
@ -138,7 +137,6 @@ class DiscourseModule:
|
|
|
|
date = "strftime('%s', 'now')"
|
|
|
|
date = "strftime('%s', 'now')"
|
|
|
|
|
|
|
|
|
|
|
|
# Craft the str
|
|
|
|
# Craft the str
|
|
|
|
print(data)
|
|
|
|
|
|
|
|
command = "INSERT INTO discourse VALUES ("
|
|
|
|
command = "INSERT INTO discourse VALUES ("
|
|
|
|
command += "{}, {}, {}, {}, {}, {}, {});".format(date, *data)
|
|
|
|
command += "{}, {}, {}, {}, {}, {}, {});".format(date, *data)
|
|
|
|
|
|
|
|
|
|
|
@ -176,7 +174,6 @@ class DiscourseModule:
|
|
|
|
|
|
|
|
|
|
|
|
# Use a lambda to map the data into a dict with the keys
|
|
|
|
# Use a lambda to map the data into a dict with the keys
|
|
|
|
for row in data:
|
|
|
|
for row in data:
|
|
|
|
print(row)
|
|
|
|
|
|
|
|
_data = {keys[x] : row[x] for x in range(len(row))}
|
|
|
|
_data = {keys[x] : row[x] for x in range(len(row))}
|
|
|
|
|
|
|
|
|
|
|
|
# Add our ephemeral dict to the master dict, and create the key if
|
|
|
|
# Add our ephemeral dict to the master dict, and create the key if
|
|
|
|