It's probably something quite easy but I can't figure out why my script won't work. I'm trying to make a connection with my sqlite3 database but eclipse returns the error: "Undefined variable from import: connect". I'm running python 3.3 in a virtualenv on linux. Thanks for your help!
from urllib.request import urlopen
import datetime
import sqlite3
class Crawler():
def storeContent(self, html, url):
conn = sqlite3.connect('database.db')
c = conn.cursor()
c.execute("INSERT .. ", [item, item])
c.commit()
c.close()