Many more updates:
- Renamed project to metahandler as metautils was interferring with Icefilms
- Scraping of movies by Name and Year (optional) is fully working and so far seems quite accurate, scraping of movies by IMDB is always more ideal and faster
- TV Show Season scraping is working by either IMDB or TV Show name
eg.
Code:
metapath = xbmc.translatePath('special://profile/addon_data/script.module.metahandler/meta_cache')
metaget=metahandlers.MetaData(metapath,preparezip = True)
meta = metaget.get_meta('','tvshow','The Simpsons')
print meta
Seaons and Episodes I believe will work fine as well, but haven't dug into that portion of the code yet to see what needs to be cleaned up
Once you have the TV Show scraped you *should* have the IMDB id
Season:
Code:
season_list = ['Season 1','Season 2']
seasons = metaget.getSeasonCover(imdb_id, season_list, refresh=False)
print seasons
Episode:
Code:
episode=metaget.get_episode_meta(imdb_id, season_num, episode_num)
print episode
I'm hoping others can test this and mainly spot it's accuracy and areas where it can be improved, this is mainly dealing with scraping by only Movie/TV Show name - no IMDB
Question:
Currently the cache DB stores a number of items including the movie/tv show name.. as sites could potentially leave out special characters (or even spaces), and capitalization when spelling out the name it causes the search by name difficult
So for my string compares I have resorted to putting all strings to lower case and stripping all non alphanumerics using isalnum()
Looking for comments on whether I should also store the movie/tv show names with everything stripped and lower cased? The name is used to initially check if it exists in cache before it tries to scrape, and checks again before it tries to add a new entry to the DB