2011-01-27, 01:04
got a bit further with making it work with mysql
needs to be changed to
(mysqldb uses %s instead of ? as a placeholder)
Now it runs through all the movies in the db ok but fails when it tries to scrape the first movie with
time for bed so will look at this another time
Code:
c.execute('SELECT c09, c00, idMovie FROM movie WHERE idMovie > ?',(lastid,))
needs to be changed to
Code:
c.execute('SELECT c09, c00, idMovie FROM movie WHERE idMovie > [b]%s[/b]',(lastid,))
(mysqldb uses %s instead of ? as a placeholder)
Now it runs through all the movies in the db ok but fails when it tries to scrape the first movie with
Code:
Traceback (most recent call last):
File "imdb.py", line 118, in <module>
string = d_notify + title[j] + "(" + str(lid[j]) + ")" + " rating: " + str(rating[0]) + "/10"
IndexError: list index out of range
time for bed so will look at this another time