""" Usage Examples: ### Search ### ** Returns a list of Movies searched for from IMDB Search IMDB Movies searchmovies ** Returns a list of TV Shows searched for from IMDB Search IMDB TV Shows searchseries ### Movies ### ** Returns a list of the IMDB Trending Movies IMDB Trending Movies movies/trending ** Returns a list of the IMDB Box Office Movies IMDB Box Office Movies movies/boxoffice ** Returns a list of the IMDB Most Popular Movies IMDB Most Popular Movies movies/popular ** Returns a list of the IMDB Most Voted Movies IMDB Most Voted Movies movies/voted ** Returns a list of IMDB Movies by a specific Year. Change Year at the end of the Second Tag as desired. IMDB 2018 Movies years/2018 * other Years found in movies_years-imdb.xml ### TV Shows ### ** Returns a list of the IMDB Newest TV Shows IMDB Newest TV Shows tvshows/new ** Returns a list of the IMDB Most Viewed TV Shows IMDB Most Viewed TV Shows tvshows/mostviews ** Returns a list of the IMDB Best User Rated TV Shows IMDB Best User Rated TV Shows tvshows/rating ** Returns a list of the IMDB Most Popular TV Shows IMDB Most Popular TV Shows tvshows/popular ** Returns a list of the IMDB Box Office TV Shows IMDB Box Office TV Shows tvshows/boxoffice ** Returns a list of IMDB TV Shows in Alphabetical order IMDB A to Z TV Shows tvshows/alphabetical ### Charts ### ** Returns a list of the IMDB Top Rated TV Shows IMDB Top Rated TV Shows charttv/toptv ### Genres ### ** Returns a list of IMDB Movies by a specific Genre. Switch out "action" Genre as desired at the end Of the Second Tag. IMDB Action Movies genres/action * other Genres found in movies_genres-imdb.xml ** Returns a list of IMDB TV Shows by a specific Genre. Switch out "history" Genre as desired at the end Of the Second Tag. IMDB History TV Shows genrestv/history * other Genres found in tvshows_genres-imdb.xml ### User Lists ### ** Returns ALL public IMDB Lists from a specific user Someone's IMDB Lists user/ur19947955/lists # If you have a IMDB account with lists, add YOUR user ID like this and it will return all public lists on YOUR account ** Returns a SINGLE public IMDB List from a specific user Someone's IMDB List /list/ls068927829/ ** Returns a specific user's IMDB Top 100 Gangster Movies public list IMDB TOP 100 Gangster Movies list/ls001818278 ### Calendar ### ** Returns a List of Upcoming Releases by Country. IMDB Upcoming Releases in the United States moviecalendar/US ** Returns a List of Upcoming Releases by Country IMDB Upcoming Releases in the United Kingdom moviecalendar/GB ** Returns a List of Upcoming Releases by Country IMDB Upcoming Releases in Mexico moviecalendar/MX ------------------------------------------------------------- """ from resources.modules import log from resources.modules import public import logging,xbmcplugin,sys,re,xbmc,json addDir3=public.addDir3 addLink=public.addLink from resources.modules.client import get_html def run(url,lang,icon,fanart,plot,name): return addDir3(name,'imdburl',193,icon,fanart,plot,id=url) def next_level(url,icon,fanart,plot,name,id): COLOR1 = "" COLOR2 = "" all_d=[] if 'searchmovies' in id: search_entered = '' keyboard = xbmc.Keyboard(search_entered, 'Search iMDB Movies') keyboard.doModal() if keyboard.isConfirmed(): search_entered = keyboard.getText().replace(' ','+') if len(search_entered)>1: id = 'movies$$$$$http://www.imdb.com/search/title?title=' + search_entered else: return 0 if 'movies' in id: id=id.replace('movies$$$$$','') id = id.replace("movies/popular","http://www.imdb.com/search/title?title_type=feature,tv_movie&num_votes=1000,&production_status=released&groups=top_1000&sort=moviemeter,asc&count=40&start=1").replace("movies/voted","http://www.imdb.com/search/title?title_type=feature,tv_movie&num_votes=1000,&production_status=released&sort=num_votes,desc&count=40&start=1").replace("movies/trending","http://www.imdb.com/search/title?title_type=feature,tv_movie&num_votes=1000,&production_status=released&release_date=date[365],date[60]&sort=moviemeter,asc&count=40&start=1").replace("movies/boxoffice","http://www.imdb.com/search/title?title_type=feature,tv_movie&production_status=released&sort=boxoffice_gross_us,desc&count=40&start=1") log.warning(id) listhtml = get_html(id).content() match = re.compile( '.+?\n.+?\n.+?
\n

\n.+?.+?\n.+?\n.+?(.+?)\n.+?(.+?)', re.IGNORECASE | re.DOTALL).findall(listhtml) for thumbnail, imdb, title, year in match: name = title + " " + year year = year.replace("(","").replace(")","") thumbnail = thumbnail.replace("@._V1_UX67_CR0,0,67,98_AL_.jpg","@._V1_UX520_CR0,0,520,700_AL_.jpg") if not COLOR1 == "": name = "[COLOR %s]%s[/COLOR]" % (COLOR1, name) aa=addDir3( name, 'www',15, thumbnail,thumbnail,name,data=year,original_title=name,id=imdb,eng_name=name,show_original_year=year,heb_name=name) all_d.append(aa) next_page = re.compile( '\n.+?

\n.+?
\n

\n.+?.+?\n.+?\n.+?(.+?)\n.+?(.+?)', re.IGNORECASE | re.DOTALL).findall(listhtml) for thumbnail, imdb, title, year in match: name = title + " " + year year = year.replace("(","").replace(")","") thumbnail = thumbnail.replace("@._V1_UX67_CR0,0,67,98_AL_.jpg","@._V1_UX520_CR0,0,520,700_AL_.jpg") if not COLOR1 == "": name = "[COLOR %s]%s[/COLOR]" % (COLOR1, name) aa=addDir3(name,'imdburl',193,thumbnail,thumbnail,plot,id='season/%s'%imdb) all_d.append(aa) next_page = re.compile( 'Years


\n.+?
\n.+?
\n.+?
\n.+?(.+?)  ', re.IGNORECASE | re.DOTALL).findall(listhtml) #match3 = re.compile('
\n.+?
.+?