pull/100/head
David John 8 years ago
commit 1ab01c70c6

@ -55,4 +55,8 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
main() try:
main()
except KeyboardInterrupt:
print("Shreddit aborted by user")
quit()

@ -107,7 +107,7 @@ class Shredder(object):
output = {k: item.__dict__[k] for k in item.__dict__ if not k.startswith("_")} output = {k: item.__dict__[k] for k in item.__dict__ if not k.startswith("_")}
output["subreddit"] = output["subreddit"].title output["subreddit"] = output["subreddit"].title
output["author"] = output["author"].name output["author"] = output["author"].name
json.dump(output, fh) json.dump(output, fh, indent=2)
def _remove_submission(self, sub): def _remove_submission(self, sub):
self._logger.info("Deleting submission: #{id} {url}".format(id=sub.id, url=sub.url.encode("utf-8"))) self._logger.info("Deleting submission: #{id} {url}".format(id=sub.id, url=sub.url.encode("utf-8")))

Loading…
Cancel
Save