I have a code:
import requests
import sqlite3
conn = sqlite3.connect('g.db')
c = conn.cursor()
for row in c.execute('SELECT * FROM urls ORDER BY utl'):
r = requests.get(row[3])
c.execute('UPDATE urls SET utl = ? WHERE ID = ?' , ([sqlite3.Binary(r.content)], row[0]))
conn.commit()
conn.close()
I have error:
Traceback (most recent call last):
File "/Users/mkhitaryan/Documents/303.py", line 8, in <module>
c.execute('UPDATE urls SET utl = ? WHERE ID = ?' , ([sqlite3.Binary(r.content)], row[0]))
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
[Finished in 1.4s with exit code 1]
[shell_cmd: python -u "/Users/mkhitaryan/Documents/303.py"]
[dir: /Users/mkhitaryan/Documents]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
Why!?