diff --git a/web-to-db.py b/web-to-db.py index 902e5b0..d6782d2 100644 --- a/web-to-db.py +++ b/web-to-db.py @@ -37,6 +37,9 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): def insert_xml(self, data): try: conn = psycopg2.connect("dbname=hackzurich") + cursor = conn.cursor() + cursor.execute("insert into data_test4 (packet) values ('%s')" % data) + conn.close() except Exception as e: print("DB Insert failed: %s" % e)