Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from datetime import datetime
- import sqlite3
- import string
- pa = set(string.printable)
- convos = []
- conn = sqlite3.connect("main.db")
- c = conn.cursor()
- c.execute("SELECT * FROM Messages WHERE author = \"kranxxitup\"")
- for t in c.fetchall():
- if not t[2] in convos:
- convos.append(t[2])
- cs = ""
- a = 0
- c.execute("SELECT * FROM Messages")
- output = ""
- for msg in c.fetchall():
- if msg[2] in convos:
- output += "\n----------"
- output += "\n" + str(datetime.fromtimestamp(msg[9])) + " chat id " + str(msg[2])
- output += "\n" + msg[5] + " (" + msg[4] + ")"
- output += "\n" + (''.join(filter(lambda x: x in pa, str(msg[17])))).replace("'","'")
- with open("skype.txt","w") as f:
- f.write(output)
Advertisement
Add Comment
Please, Sign In to add comment