[RELEASE] IMDB Ratings for Movies - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: [RELEASE] IMDB Ratings for Movies (/showthread.php?tid=92132) |
- atconc - 2011-01-27 got a bit further with making it work with mysql 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): time for bed so will look at this another time - cosmicr - 2011-01-27 atconc Wrote: that line's not a show stopper, take it out and see if it works. if it does send me the code and I'll integrate it into the addon. I suppose the user will have to specify their database type (with the default being sqlite). Unless someone knows how to check the type first? - cosmicr - 2011-01-27 Scidd0w Wrote:Just tested it and it installs and works under windows7 as well. oops, I missed that line, it was the same problem as earlier - non-ascii (utf-8) symbols seem to stuff it up - which most french titles seem to have I will fix it later. - atconc - 2011-01-27 cosmicr Wrote:that line's not a show stopper, take it out and see if it works. if it does send me the code and I'll integrate it into the addon. I think that line builds the IMDB url so is pretty critical? If I comment it out then the run fails because the variable string is undefined. Will keep playing with it... edit - ignore me - it's just building a like to print in the log - atconc - 2011-01-27 atconc Wrote:edit - ignore me - it's just building a like to print in the log It seems like I've got the database part working but the scraping isn't working for me the str(rating[0]) part is what's throwing the error about the array index being out of bounds which suggests that the rating is never being fetched (I think?) I put a few print statements in and it looks like I never get into the if(rating) if(votes) or if(top250) branches of the code so it now just runs through listing out the url for each of the movies like this: Code: IMDB Rating Script: 279 Movies to update I've not really got any idea how to debug the scraper so I think I'm stuck for now. - cosmicr - 2011-01-28 atconc Wrote: well I'm not really sure what's happening there, but if you could send me the full code I'd like to have a look. I can't really test mySQL since I dont have a database, but perhaps I could debug your code and get it working for you... - atconc - 2011-01-28 My (very messy) code so far is here, I took out all the xbmc specific stuff so I could run it standalone http://db.tt/kGyQxZL - Scidd0w - 2011-01-29 Do you maybe have some time to bring out a fix for the non-ascii char bug I reported earlier? After this fix I can use it for allmy movies without crashing - cosmicr - 2011-02-03 hey there I've been a bit busy (working on my other addons ) but I will post an update in the next few days. - Scidd0w - 2011-02-03 Super! Thank you for the reply and take your time. I'll wait (im)patiently.. hehe [update] I do not not know if it is allowed to post feature request but I do it anyway. Could yoy maybe add an option to also show, when the movie is in the IMDB top250, the ranking number in the top250. Example: 9.0 (top250 #5) - jemelvyn - 2011-02-09 I'm getting the same issue with non standard characters, its falling over with Brüno for me. I'd love to see this working at the moviedb ratings are pretty useless. I'm surprised this isn't an issue for more people, thanks for the efforts so far. - Scidd0w - 2011-02-25 cosmicr; Can you maybe tell me how to fix it? What to change in what lines? Than I can update it myself and I do not have to bother you again. Thank you in advance! - frellAn - 2011-03-13 Please make this for Windows as well, this is gold! It works for me until it gets to a non ascii character, in this case "é" in "Amélie from Montmartre". If this could be done to run periodically and always keep your movies up to date with the rating, it would be awesome! - DazNoonan - 2011-03-13 This looks good, any plans to port for ATV2? I'm willing to test it if you wish... - DazNoonan - 2011-03-16 DazNoonan Wrote:This looks good, any plans to port for ATV2? I'm willing to test it if you wish...Any thoughts? |