It seems like a really simple task but I'm having difficulties doing it proper.
My SQL Query look like this:
self.link = self.db.cursor(pymysql.cursors.DictCursor);
self.link.execute("SELECT * FROM crawler_data WHERE id=%d" % id_crawl)
And I want to access the columns by the following:
row = self.link.fetchall()
if row["address"]:
self.address = self.filterAddress(row["address"])
I get the error "list indices must be integers, not str"
.
When I print the row
I get the following structure returned:
{u'address': 'Address Value', u'domain': 'Domain Value'}
How do I access the "address" string?