|
|
|
@ -9,6 +9,11 @@ import textwrap
|
|
|
|
|
from time import mktime, strptime
|
|
|
|
|
from collections import defaultdict
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
input = raw_input
|
|
|
|
|
except NameError:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from urlparse import urlparse
|
|
|
|
|
except ImportError:
|
|
|
|
@ -43,6 +48,10 @@ def insert(db, thread, posts):
|
|
|
|
|
|
|
|
|
|
def disqus(db, xmlfile):
|
|
|
|
|
|
|
|
|
|
if db.execute("SELECT * FROM comments").fetchone():
|
|
|
|
|
if input("Isso DB is not empty! Continue? [y/N]: ") not in ("y", "Y"):
|
|
|
|
|
raise SystemExit("Abort.")
|
|
|
|
|
|
|
|
|
|
tree = ElementTree.parse(xmlfile)
|
|
|
|
|
res = defaultdict(list)
|
|
|
|
|
|
|
|
|
|