I also ran into the same problem. The solution is quite simple.
Do this before making "sql" string:
url = '"'+url+'"'
The problems arises because inside the string the " symbol is not present sql sees it as a command rather than as a string.
-1
votes
try the following:
sql = "INSERT INTO warrent(link, content) values (\'{0}\', \'{1}\')".format(url,page)
self.curs.execute(sql)
In your example \' won't the ":" from url.
Cheers,
Jakub
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more