Apali Marathi Natak
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up# ApaliMarathi Plugin by |
import os |
import re |
import urllib, urllib2 |
import sys |
import xbmc |
import xbmcgui |
import xbmcplugin |
import xbmcaddon |
import CommonFunctions |
import HTMLParser, urlparse |
import urlresolver |
from urlparse import urljoin |
import requests |
common = CommonFunctions |
common.plugin ='plugin.video.apalimarathi' |
#common.dbg = True # Default |
#common.dbglevel = 9 # Default |
ADDON= xbmcaddon.Addon(id='plugin.video.apalimarathi') |
APALIMARATHI_MOVIES_URL='http://mtalky.com/' |
APALIMARATHI_NATAKS_URL='http://mtalky.com/' |
APALIMARATHI_MOVIES_PAGE_URL='http://mtalky.com/list.aspx?Show=Picture&page=' |
APALIMARATHI_MOVIES_ALPHA_URL='http://mtalky.com/list.aspx?Show=Picture&NameStartWithLetter=' |
APALIMARATHI_NATAKS_ALPHA_URL='http://mtalky.com/list.aspx?Show=Nataks&NameStartWithLetter=' |
APALIMARATHI_MOVIES_YEARS_URL='http://mtalky.com/list.aspx?Show=Picture&ReleaseYear=' |
APALIMARATHI_NATAKS_PAGE_URL='http://mtalky.com/list.aspx?Show=Nataks&page=' |
APALIMARATHI_ZEE_MARATHI_BASE_URL='http://tvforumonline.com/' |
APALIMARATHI_ZEE_MARATHI_URL='http://tvforumonline.com/Guide.aspx?c=One' |
defaddDir(name, url, mode, iconimage, bannerImage='', lang='', infolabels=None): |
u=sys.argv[0]+'?url='+urllib.quote_plus(url)+'&mode='+str(mode)+'&name='+urllib.quote_plus(name)+'&lang='+urllib.quote_plus(lang)+'&bannerImage='+urllib.quote_plus(bannerImage)+'&iconImage='+urllib.quote_plus(iconimage) |
#print iconimage |
liz=xbmcgui.ListItem(name, iconImage='DefaultFolder.png', thumbnailImage=iconimage) |
#liz=xbmcgui.ListItem(name, iconImage=iconimage, thumbnailImage=iconimage) |
liz.setInfo( type='Video', infoLabels={ 'Title': name } ) |
if infolabels !=None: |
#liz.setInfo( type='Video', infoLabels={ 'Plot': infolabels['Plot'], 'Year': infolabels['Year'] } ) |
liz.setInfo( type='Video', infoLabels=infolabels ) |
liz.setProperty('IsPlayable', 'true') |
iflen(bannerImage): |
liz.setProperty('fanart_image', bannerImage) |
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True) |
return ok |
## |
# Prints the main categories. Called when id is 0. |
## |
defmain_categories(name, url, language, mode, iconimage, bannerimage): |
cwd =ADDON.getAddonInfo('path') |
img_path = cwd +'/images/' |
addDir('Marathi Movies', '', 7, img_path +'Marathi_Movies.png', 'marathi') |
addDir('Marathi Natak', '', 15, img_path +'rangabhomi.jpg', 'marathi') |
addDir('Marathi TV Shows', '', 19, img_path +'Marathi_Malika.png', 'marathi') |
addDir('Addon Settings', '', 13, img_path +'settings.png', '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defget_params(): |
param=[] |
paramstring=sys.argv[2] |
iflen(paramstring)>=2: |
params=sys.argv[2] |
cleanedparams=params.replace('?','') |
if (params[len(params)-1]'/'): |
params=params[0:len(params)-2] |
pairsofparams=cleanedparams.split('&') |
param={} |
for i inrange(len(pairsofparams)): |
splitparams={} |
splitparams=pairsofparams[i].split('=') |
if (len(splitparams))2: |
param[splitparams[0]]=splitparams[1] |
return param |
definner_categories(name, url, language, mode, iconimage, bannerimage): |
cwd =ADDON.getAddonInfo('path') |
img_path = cwd +'/images/' |
postData ='lang='+ language +'&' |
postDataPage ='1' |
addDir('Recent', postDataPage, 3, img_path +'recent.png', language) |
addDir('A-Z', postData, 8, img_path +'a_z.png', language) |
addDir('Years', postData, 12, img_path +'years.png', language) |
#addDir('Actors', postData, 10, img_path + 'actors.png', language) |
#addDir('Director', postData, 11, img_path + 'director.png', language) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
definner_natak_categories(name, url, language, mode, iconimage, bannerimage): |
cwd =ADDON.getAddonInfo('path') |
img_path = cwd +'/images/' |
postData ='lang='+ language +'&' |
postDataPage ='1' |
addDir('Recent', postDataPage, 16, img_path +'recent.png', language) |
addDir('A-Z', postData, 17, img_path +'a_z.png', language) |
#addDir('Years', postData, 12, img_path + 'years.png', language) |
#addDir('Actors', postData, 10, img_path + 'actors.png', language) |
#addDir('Director', postData, 11, img_path + 'director.png', language) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defshow_recent_natak_list(name, url, language, mode, iconimage, bannerimage): |
cwd =ADDON.getAddonInfo('path') |
currentPage =int(url) |
print'input url-Page = [%d]'% currentPage |
###html_string = common.fetchPage({'link': APALIMARATHI_NATAKS_PAGE_URL + str(currentPage)}) |
html_string = requests.get(APALIMARATHI_NATAKS_PAGE_URL+str(currentPage)).text |
common.log(html_string) |
retMovies = get_movies_from_url(APALIMARATHI_NATAKS_PAGE_URL+str(currentPage)) |
for i inrange(0, len(retMovies)): |
addDir((retMovies[i]['Title']).encode('utf-8'), APALIMARATHI_NATAKS_URL+ (retMovies[i]['Link']).encode('utf-8'), 9, (retMovies[i]['ImageLink']).encode('utf-8')) |
#Create the Next Page link |
###page_div = common.parseDOM(html_string['content'], 'div', attrs = { 'id': 'Main_ChildContent1_Panel1' }) |
page_div = common.parseDOM(html_string, 'div', attrs= { 'id': 'Main_ChildContent1_Panel1' }) |
page_list = common.parseDOM(page_div, 'a') #, ret = 'href') |
printrepr(page_list) |
#page_links_list = common.parseDOM(html_string, 'a', attrs = { 'class': 'pageLink' }) |
iflen(page_list): |
print'Max Pages = %d'%len(page_list) |
if currentPage <len(page_list): |
addDir('Next >>', str(currentPage+1), 16, 'http://psnc.org.uk/wp-content/uploads/2015/07/eps-arrow-yellow-next-250x255.png', '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defshow_recent_list(name, url, language, mode, iconimage, bannerimage): |
cwd =ADDON.getAddonInfo('path') |
currentPage =int(url) |
print'input url-Page = [%d]'% currentPage |
#html_string = common.fetchPage({'link': APALIMARATHI_MOVIES_PAGE_URL + str(currentPage)}) |
html_string = requests.get(APALIMARATHI_MOVIES_PAGE_URL+str(currentPage)).text |
common.log(html_string) |
retMovies = get_movies_from_url(APALIMARATHI_MOVIES_PAGE_URL+str(currentPage)) |
for i inrange(0, len(retMovies)): |
addDir((retMovies[i]['Title']).encode('utf-8'), APALIMARATHI_MOVIES_URL+ (retMovies[i]['Link']).encode('utf-8'), 9, (retMovies[i]['ImageLink']).encode('utf-8')) |
#Create the Next Page link |
###page_div = common.parseDOM(html_string['content'], 'div', attrs = { 'id': 'Main_ChildContent1_Panel1' }) |
page_div = common.parseDOM(html_string, 'div', attrs= { 'id': 'Main_ChildContent1_Panel1' }) |
page_list = common.parseDOM(page_div, 'a') #, ret = 'href') |
printrepr(page_list) |
#page_links_list = common.parseDOM(html_string, 'a', attrs = { 'class': 'pageLink' }) |
iflen(page_list): |
print'Max Pages = %d'%len(page_list) |
if currentPage <len(page_list): |
addDir('Next >>', str(currentPage+1), 3, 'http://psnc.org.uk/wp-content/uploads/2015/07/eps-arrow-yellow-next-250x255.png', '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defshow_movie_page(name, url, language, mode, iconimage, bannerimage): |
print'Showing Main Movie Page: '+ name +', with url:'+ url |
###movie_page_html_string = common.fetchPage({'link': url}) |
movie_page_html_string = requests.get(url).text |
###print repr(movie_page_html_string['content']) |
printrepr(movie_page_html_string) |
###Need to figure out unicode font support |
#movie_name_list = common.parseDOM(movie_page_html_string['content'], 'span', attrs = { 'id': 'Main_NameLabel' }) |
#print (movie_name_list[0]).encode('utf-8') |
#addDir((movie_name_list[0]).encode('utf-8'), url, 2, ') |
###movie_image_list = common.parseDOM(movie_page_html_string['content'], 'img', attrs = { 'id': 'Main_imageResize1' }, ret = 'src') |
movie_image_list = common.parseDOM(movie_page_html_string, 'img', attrs= { 'id': 'Main_imageResize1' }, ret='src') |
print (movie_image_list[0]).encode('utf-8') |
match = re.compile('img.ashx?p=(.+?) ').findall(movie_image_list[0]) |
banner_image_url = match[0] |
print'BANNER_IMG:'+ banner_image_url |
#print 'getProperty: ' + self.list.getProperty('thumbnailImage') |
print'IMG:'+ iconimage |
#get the Form elements. |
###viewstate_list = common.parseDOM(movie_page_html_string['content'], 'input', attrs = { 'id': '__VIEWSTATE' }, ret = 'value') |
viewstate_list = common.parseDOM(movie_page_html_string, 'input', attrs= { 'id': '__VIEWSTATE' }, ret='value') |
print (viewstate_list[0]).encode('utf-8') |
movie_sources_names_list = [] |
#Find the movie sources - value |
###movie_source_list = common.parseDOM(movie_page_html_string['content'], 'input', attrs = { 'type': 'submit' }, ret = 'value') |
movie_source_list = common.parseDOM(movie_page_html_string, 'input', attrs= { 'type': 'submit' }, ret='value') |
for i inrange(0, len(movie_source_list)): |
movie_source_name = {} |
movie_source_name['value'] = movie_source_list[i] |
print (movie_source_list[i]).encode('utf-8') |
movie_sources_names_list.append(movie_source_name) |
#Find the movie sources - name |
###movie_source_list = common.parseDOM(movie_page_html_string['content'], 'input', attrs = { 'type': 'submit' }, ret = 'name') |
movie_source_list = common.parseDOM(movie_page_html_string, 'input', attrs= { 'type': 'submit' }, ret='name') |
for i inrange(0, len(movie_source_list)): |
movie_sources_names_list[i]['name'] = movie_source_list[i] |
#Find the first page URL by POSTing the form data |
###l_post_data = { '__VIEWSTATE' : viewstate_list[0], '__SCROLLPOSITIONX' : '0', '__SCROLLPOSITIONY' : '400', '__EVENTTARGET' : ', movie_sources_names_list[i]['name'] : movie_sources_names_list[i]['value'].encode('utf-8') } |
l_post_data = { '__VIEWSTATE' : viewstate_list[0], '__SCROLLPOSITIONX' : '0', '__SCROLLPOSITIONY' : '400', '__EVENTTARGET' : '', movie_sources_names_list[i]['name'] : movie_sources_names_list[i]['value'].encode('utf-8') } |
###movie_page_1_html_string = common.fetchPage({'link': url, 'post_data' : l_post_data}) |
movie_page_1_html_string = requests.post(url, data=l_post_data) |
###print repr(movie_page_1_html_string['content']) |
#print movie_page_1_html_string |
print'redirect url: '+ movie_page_1_html_string.url |
###movie_sources_names_list[i]['Link'] = movie_page_1_html_string['new_url'].encode('utf-8') |
movie_sources_names_list[i]['Link'] = movie_page_1_html_string.url.encode('utf-8') |
print (movie_source_list[i]).encode('utf-8') |
for i inrange(0, len(movie_sources_names_list)): |
#addDir((movie_sources_names_list[i]['value']).encode('utf-8'), (movie_sources_names_list[i]['Link']).encode('utf-8'), 10, banner_image_url.encode('utf-8')) |
addDir((movie_sources_names_list[i]['value']).encode('utf-8'), (movie_sources_names_list[i]['Link']).encode('utf-8'), 10, iconimage.encode('utf-8'), banner_image_url.encode('utf-8')) |
#addDir(name, url, 2, match[0].encode('utf-8')) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
#Shows all parts for selected Source |
defshow_movie_sources_page(name, url, language, mode, iconimage, bannerimage): |
print'Showing Parts Page for Soruce: '+ name +', with url:'+ url |
h = HTMLParser.HTMLParser() |
isLastPage =False |
#Start with the url of 1st part page |
part_page_url = url |
nParts =0; |
#Loop until we reach the last page |
while isLastPage False: |
nParts = nParts +1 |
#Fetch the part page from the URL |
###part_page_html = common.fetchPage({'link': part_page_url}) |
print'part_page_url: '+repr(part_page_url) |
part_page_html = requests.get(part_page_url).text |
print'part_page_url Read' |
#print 'part_page_html: ' + repr(part_page_html) |
#Parse the URL for the Main_EmbDiv to get movie Embed link Page |
###part_embed_link_list = common.parseDOM(part_page_html['content'], 'div', attrs = { 'id': 'Main_EmbDiv' }) |
part_embed_link_list = common.parseDOM(part_page_html, 'div', attrs= { 'id': 'Main_EmbDiv' }) |
print' After Parsing part_page_html: ' |
iflen(part_embed_link_list): |
#print 'Main_EmbDiv: ' + repr(part_embed_link_list[0]) |
match = re.compile('load('(.+?)')').findall(part_embed_link_list[0]) |
iflen(match): |
part_embed_url = urljoin(url, match[0]) |
#print 'PART URL:' + part_embed_url |
#Find the atual provided URL |
###part_embed_html = common.fetchPage({'link': part_embed_url}) |
print'part_embed_url: '+repr(part_embed_url) |
part_embed_html = requests.get(part_embed_url).text |
print'part_embed_url read: ' |
#print 'part_embed_html: ' + repr(part_embed_html['content']) |
###part_iframe_src_list = common.parseDOM(part_embed_html['content'], 'iframe', ret = 'src') |
part_iframe_src_list = common.parseDOM(part_embed_html, 'iframe', ret='src') |
print' After Parsing part_embed_html: ' |
iflen(part_iframe_src_list): |
print'iframe_src: '+repr(part_iframe_src_list[0]) |
addDir(name +' : Part %d'% nParts, part_iframe_src_list[0].encode('utf-8'), 2, iconimage, bannerimage) |
#Parse the URL for the Next Pages |
###next_part_page_list = common.parseDOM(part_page_html['content'], 'a', attrs = { 'id': 'Main_lnkNext'}, ret = 'href') |
next_part_page_list = common.parseDOM(part_page_html, 'a', attrs= { 'id': 'Main_lnkNext'}, ret='href') |
print' After Parsing part_page_html 2: ' |
iflen(next_part_page_list): |
print'Next Page Partial URL: '+repr(next_part_page_list[0]) |
#part_page_url = urljoin(url, urllib.quote_plus(h.unescape(next_part_page_list[0]))) |
part_page_url = urlencode_local( urljoin(url, h.unescape(next_part_page_list[0])) ) |
print'Next Page URL: '+repr(part_page_url) |
else: |
isLastPage =True |
if nParts >=20: isLastPage =True#Just a termination condition for testing |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defurlencode_local(in_url): |
out_url = in_url |
p = urlparse.urlparse(in_url) |
out_url = urlparse.urlunsplit((p.scheme, p.netloc, p.path, urllib.quote(p.query, ':&='), p.fragment)) |
return out_url |
## |
# Plays the video. Called when the id is 2. |
## |
defplay_video(name, url, language, mode, iconimage, bannerimage): |
print'Playing: '+ name +', with url:'+ url |
stream_url = urlresolver.HostedMediaFile(url=url, host='', media_id='').resolve() |
if stream_url: |
print'Playing: stream_url:'+ stream_url |
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) |
playlist.clear() |
listitem = xbmcgui.ListItem(name) |
listitem.setThumbnailImage(iconimage) |
playlist.add(stream_url, listitem) |
xbmc.Player().play(playlist) |
else: |
print'No Video stream resolved for URL: '+ url |
if url.find('vid.me') >0: |
print'Trying to resolve for vid.me [%s]'% url |
html = common.fetchPage({'link': url})['content'] |
r = re.search('<meta property.*og:video:url.*s*content='([^']+.mp4[^']+)', html) |
if r: |
stream_url = r.group(1).replace('&', '&') |
print'Playing: stream_url:'+ stream_url |
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) |
playlist.clear() |
listitem = xbmcgui.ListItem(name) |
listitem.setThumbnailImage(iconimage) |
playlist.add(stream_url, listitem) |
xbmc.Player().play(playlist) |
elif url.find('sendvid.com') >0: |
print'Trying to resolve for sendvid.com [%s]'% url |
html = common.fetchPage({'link': url})['content'] |
#r = re.search('<meta property.*og:video.*content='([^']+.mp4)', html) |
r = re.search(''vars+video_sources*=s*['](http.*?mp4.*)[']'', html) |
if r: |
stream_url = r.group(1).replace('&', '&') |
print'Playing: stream_url:'+ stream_url |
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) |
playlist.clear() |
listitem = xbmcgui.ListItem(name) |
listitem.setThumbnailImage(iconimage) |
playlist.add(stream_url, listitem) |
xbmc.Player().play(playlist) |
else: |
__addon__ = xbmcaddon.Addon() |
__addonname__ = __addon__.getAddonInfo('name') |
__icon__ = __addon__.getAddonInfo('icon') |
line1 ='Link Removed. Please try another one.' |
time =5000#in miliseconds |
xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%(__addonname__,line1, time, __icon__)) |
## |
# Displays the options for A-Z view. Called when id is 8. |
## |
defshow_A_Z(name, url, language, mode, iconimage, bannerimage): |
azlist =map (chr, range(65,91)) |
for letter in azlist: |
addDir(letter, letter, 11, '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defshow_natak_A_Z(name, url, language, mode, iconimage, bannerimage): |
azlist =map (chr, range(65,91)) |
for letter in azlist: |
addDir(letter, letter, 18, '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
## |
# Displays the List of movies for selected alphabet. Called when id is 11. |
## |
defshow_movie_list_by_alpha(name, url, language, mode, iconimage, bannerimage): |
currentPage = url |
print'input url-Alphabet = [%s]'% currentPage |
retMovies = get_movies_from_url(APALIMARATHI_MOVIES_ALPHA_URL+ currentPage) |
for i inrange(0, len(retMovies)): |
addDir((retMovies[i]['Title']).encode('utf-8'), APALIMARATHI_MOVIES_URL+ (retMovies[i]['Link']).encode('utf-8'), 9, (retMovies[i]['ImageLink']).encode('utf-8')) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defshow_natak_list_by_alpha(name, url, language, mode, iconimage, bannerimage): |
currentPage = url |
print'input url-Alphabet = [%s]'% currentPage |
retMovies = get_movies_from_url(APALIMARATHI_NATAKS_ALPHA_URL+ currentPage) |
for i inrange(0, len(retMovies)): |
addDir((retMovies[i]['Title']).encode('utf-8'), APALIMARATHI_NATAKS_URL+ (retMovies[i]['Link']).encode('utf-8'), 9, (retMovies[i]['ImageLink']).encode('utf-8')) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defget_movies_from_url(urlIn): |
#html_string = common.fetchPage({'link': urlIn}) |
html_string = requests.get(urlIn).text |
common.log(html_string) |
#Get the entire Movie DIV |
###movie_div = common.parseDOM(html_string['content'], 'div', attrs = { 'class': 'MovieDiv' }) |
movie_div = common.parseDOM(html_string, 'div', attrs= { 'class': 'MovieDiv' }) |
movies = [] |
#Parse Image divs |
movie_image_div_list = common.parseDOM(movie_div, 'div', attrs= { 'class': 'imageDiv' }) |
#print repr(movie_image_div_list) |
for i inrange(0, len(movie_image_div_list)): |
movie = {} |
movie_image_div_href_list = common.parseDOM(movie_image_div_list[i], 'a', ret='href') |
movie['Link'] = movie_image_div_href_list[0] |
#print '%d> movie_image_div_href_list: ' % i + repr(movie_image_div_href_list) |
movie_image_link = common.parseDOM(movie_image_div_list[i], 'img', ret='data-image') |
print'%d> movie_image_link: '% i +repr(movie_image_link[0]) |
match = re.compile('Thumb120.ashx?p=s*(S+?)s* ').findall(movie_image_link[0]) |
movie['ImageLink'] = match[0] |
#print repr(movie_image_div_href_list), repr(movie_image_link) |
movies.append(movie) |
movie_span_list = common.parseDOM(movie_div, 'span', attrs= { 'class': 'movieTitle' }) #, ret = 'href') |
#print repr(movie_span_list) |
for i inrange(0, len(movie_span_list)): |
movies[i]['Title'] = movie_span_list[i] |
print (movies[i]['Title']).encode('utf-8'), (APALIMARATHI_MOVIES_URL+ movies[i]['Link']).encode('utf-8'), ((movies[i]['ImageLink']).encode('utf-8')) |
return movies |
## |
# Displays the options for A-Z view. Called when id is 8. |
## |
defshow_Years(name, url, language, mode, iconimage, bannerimage): |
###html_string = common.fetchPage({'link': APALIMARATHI_MOVIES_YEARS_URL + str(2015)}) |
html_string = requests.get(APALIMARATHI_MOVIES_YEARS_URL+str(2015)).text |
common.log(html_string) |
#Get the entire Movie DIV |
###years_div = common.parseDOM(html_string['content'], 'div', attrs = { 'id': 'Main_ChildContent1_Year' }) |
years_div = common.parseDOM(html_string, 'div', attrs= { 'id': 'Main_ChildContent1_Year' }) |
iflen(years_div): |
available_years = common.parseDOM(years_div, 'a') |
for i inrange(0, len(available_years)): |
#Add Years |
addDir(available_years[i], available_years[i], 14, '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
## |
# Displays the shows for Zee Marathi. Called when id is 20. |
## |
defshow_zee_tv_shows(name, url, language, mode, iconimage, bannerimage): |
html_string = common.fetchPage({'link': APALIMARATHI_ZEE_MARATHI_URL}) |
common.log(html_string) |
#Get the entire TV Shows DIV |
tv_shows_div = common.parseDOM(html_string['content'], 'table', attrs= { 'id': 'MainContent_DataList2' }) |
printrepr(tv_shows_div) |
iflen(tv_shows_div): |
available_shows = common.parseDOM(common.parseDOM(tv_shows_div, 'a'), 'span') |
for i inrange(0, len(available_shows)): |
#Add Show |
print (available_shows[i]).encode('utf-8') |
#addDir(available_shows[i], available_shows[i], 14, ') |
available_shows_href = common.parseDOM(tv_shows_div, 'a', ret='href') |
for i inrange(0, len(available_shows_href)): |
#Add Show |
print (available_shows_href[i]).encode('utf-8') |
addDir((available_shows[i]).encode('utf-8'), APALIMARATHI_ZEE_MARATHI_BASE_URL+ (available_shows_href[i]).encode('utf-8'), 21, '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
## |
# Displays the available dates for selected TV Show. Called when id is 21. |
## |
defshow_zee_tv_shows_dates(name, url, language, mode, iconimage, bannerimage): |
print'Showing Dates for url:[%s]'% url |
html_string = common.fetchPage({'link': url}) |
common.log(html_string) |
#Get the entire TV Shows DIV |
tv_shows_dates_table = common.parseDOM(html_string['content'], 'table', attrs= { 'id': 'MainContent_DataList2' }) |
printrepr(tv_shows_dates_table) |
iflen(tv_shows_dates_table): |
available_show_dates = common.parseDOM(tv_shows_dates_table, 'a') |
for i inrange(0, len(available_show_dates)): |
#Add Show |
print (available_show_dates[i]).encode('utf-8') |
#addDir(available_shows[i], available_shows[i], 14, ') |
available_show_dates_href = common.parseDOM(tv_shows_dates_table, 'a', ret='href') |
for i inrange(0, len(available_show_dates_href)): |
#Add Show |
print (available_show_dates_href[i]).encode('utf-8') |
addDir((available_show_dates[i]).encode('utf-8'), APALIMARATHI_ZEE_MARATHI_BASE_URL+ (available_show_dates_href[i]).encode('utf-8'), 24, '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
## |
# Displays the available parts for selected TV Show. Called when id is 22. |
## |
defshow_zee_tv_shows_parts_old(name, url, language, mode, iconimage, bannerimage): |
html_string = common.fetchPage({'link': url}) |
common.log(html_string) |
#Get the entire TV Shows DIV |
tv_shows_parts_div = common.parseDOM(html_string['content'], 'div', attrs= { 'id': 'MainContent_List' }) |
#print repr(tv_shows_parts_div) |
iflen(tv_shows_parts_div): |
available_show_parts = common.parseDOM(tv_shows_parts_div, 'a') |
for i inrange(0, len(available_show_parts)): |
#Add Show |
print (available_show_parts[i]).encode('utf-8') |
available_show_parts_href = common.parseDOM(tv_shows_parts_div, 'a', ret='href') |
for i inrange(0, len(available_show_parts_href)): |
#Add Show |
print (available_show_parts_href[i]).encode('utf-8') |
addDir((available_show_parts[i]).encode('utf-8'), APALIMARATHI_ZEE_MARATHI_BASE_URL+ (available_show_parts_href[i]).encode('utf-8'), 23, '') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
#Shows all parts for selected Date |
defshow_zee_tv_shows_parts(name, url, language, mode, iconimage, bannerimage): |
print'Showing Parts for date: '+ name +', with url:'+ url |
h = HTMLParser.HTMLParser() |
isLastPage =False |
#Start with the url of 1st part page |
part_page_url = url |
nParts =0; |
#Loop until we reach the last page |
while isLastPage False: |
nParts = nParts +1 |
#Fetch the part page from the URL |
part_page_html = common.fetchPage({'link': part_page_url}) |
#print 'part_page_html: ' + repr(part_page_html['content']) |
#Parse the URL for the MainContent_List to get movie Embed link Page |
part_embed_link_list = common.parseDOM(part_page_html['content'], 'div', attrs= { 'id': 'MainContent_List' }) |
iflen(part_embed_link_list): |
#print 'Main_EmbDiv: ' + repr(part_embed_link_list[0]) |
match = re.compile('load('(.+?)')').findall(part_embed_link_list[0]) |
iflen(match): |
part_embed_url = urljoin(url, match[0]) |
#print 'PART URL:' + part_embed_url |
#Find the atual provided URL |
part_embed_html = common.fetchPage({'link': part_embed_url}) |
#print 'part_embed_html: ' + repr(part_embed_html['content']) |
part_iframe_src_list = common.parseDOM(part_embed_html['content'], 'iframe', ret='src') |
iflen(part_iframe_src_list): |
print'iframe_src: '+repr(part_iframe_src_list[0]) |
addDir(name +' : Part %d'% nParts, part_iframe_src_list[0].encode('utf-8'), 2, iconimage, bannerimage) |
#Parse the URL for the Next Pages |
next_part_page_div = common.parseDOM(part_page_html['content'], 'div', attrs= { 'id': 'MainContent_nPart'}) |
iflen(next_part_page_div): |
next_part_page_list = common.parseDOM(next_part_page_div[0], 'a', ret='href') |
iflen(next_part_page_list): |
print'Next Page Partial URL: '+repr(next_part_page_list[0]) |
#part_page_url = urljoin(url, urllib.quote_plus(h.unescape(next_part_page_list[0]))) |
part_page_url = urlencode_local( urljoin(url, h.unescape(next_part_page_list[0])) ) |
print'Next Page URL: '+repr(part_page_url) |
else: |
isLastPage =True |
else: |
isLastPage =True |
if nParts >=20: isLastPage =True#Just a termination condition for testing |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
defget_tv_show_part_video_url(name, url, language, mode, iconimage, bannerimage): |
part_page_html = common.fetchPage({'link': url}) |
#print 'Input url-[%s]' % url |
#print 'part_page_html-[%s]' % part_page_html['content'].encode('utf-8') |
#Parse the URL for the MainContent_content1 to get movie Embed link Page |
part_embed_link_list = common.parseDOM(part_page_html['content'], 'div', attrs= { 'id': 'MainContent_content1' }) |
iflen(part_embed_link_list): |
#print 'Main_EmbDiv: ' + repr(part_embed_link_list[0]) |
match = re.compile('load('(.+?)')').findall(part_embed_link_list[0]) |
iflen(match): |
part_embed_url = urljoin(url, match[0]) |
#print 'PART URL:' + part_embed_url |
#Find the atual provided URL |
part_embed_html = common.fetchPage({'link': part_embed_url}) |
#print 'part_embed_html: ' + repr(part_embed_html['content']) |
part_iframe_src_list = common.parseDOM(part_embed_html['content'], 'iframe', ret='src') |
iflen(part_iframe_src_list): |
print'iframe_src: '+repr(part_iframe_src_list[0]) |
play_video(name, part_iframe_src_list[0].encode('utf-8'), language, mode, iconimage, bannerimage) |
## |
# Displays the List of movies for selected year. Called when id is 14. |
## |
defshow_movie_list_by_year(name, url, language, mode, iconimage, bannerimage): |
currentYear = url |
print'input url-Alphabet = [%s]'% currentYear |
retMovies = get_movies_from_url(APALIMARATHI_MOVIES_YEARS_URL+ currentYear) |
for i inrange(0, len(retMovies)): |
addDir((retMovies[i]['Title']).encode('utf-8'), APALIMARATHI_MOVIES_URL+ (retMovies[i]['Link']).encode('utf-8'), 9, (retMovies[i]['ImageLink']).encode('utf-8'), infolabels={'Year': str(currentYear), 'Plot': ''} ) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
## |
# Displays the options for A-Z view. Called when id is 8. |
## |
defshow_settings(name, url, language, mode, iconimage, bannerimage): |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
## |
# Prints the TV Channel list. Called when id is 19. |
## |
defshow_tv_channels(name, url, language, mode, iconimage, bannerimage): |
cwd =ADDON.getAddonInfo('path') |
img_path = cwd +'/images/' |
addDir('ZEE Marathi', '', 20, img_path +'Zee_Marathi.jpg', 'marathi') |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
params=get_params() |
url='' |
name='' |
mode=0 |
language='' |
bannerimage='' |
iconimage='' |
try: |
url=urllib.unquote_plus(params['url']) |
except: |
pass |
try: |
name=urllib.unquote_plus(params['name']) |
except: |
pass |
try: |
mode=int(params['mode']) |
except: |
pass |
try: |
language=urllib.unquote_plus(params['lang']) |
except: |
pass |
try: |
bannerimage=urllib.unquote_plus(params['bannerImage']) |
except: |
pass |
try: |
iconimage=urllib.unquote_plus(params['iconImage']) |
except: |
pass |
# Modes |
# 0: The main Categories Menu. Selection of language |
# 2: Play the video |
# 3: The Recent Section |
# 7: Sub menu |
# 8: A-Z view |
# 9: show_movie_page |
#10: show_movie_sources_page |
#11: show_movie_list_by_alpha |
#12: show_Years |
#13: show_settings |
#14: show_movie_list_by_year |
#15: inner_natak_categories |
#16: show_recent_natak_list |
#17: show_natak_A_Z |
#18: show_natak_list_by_alpha |
#19: show_tv_channels |
#20: show_zee_tv_shows |
#21: show_zee_tv_shows_dates |
#22: show_zee_tv_shows_parts_old |
#23: get_tv_show_part_video_url |
#24: show_zee_tv_shows_parts |
function_map = {} |
function_map[0] = main_categories |
function_map[2] = play_video |
function_map[3] = show_recent_list |
function_map[7] = inner_categories |
function_map[8] = show_A_Z |
function_map[9] = show_movie_page |
function_map[10] = show_movie_sources_page |
function_map[11] = show_movie_list_by_alpha |
function_map[12] = show_Years |
function_map[13] = show_settings |
function_map[14] = show_movie_list_by_year |
function_map[15] = inner_natak_categories |
function_map[16] = show_recent_natak_list |
function_map[17] = show_natak_A_Z |
function_map[18] = show_natak_list_by_alpha |
function_map[19] = show_tv_channels |
function_map[20] = show_zee_tv_shows |
function_map[21] = show_zee_tv_shows_dates |
function_map[22] = show_zee_tv_shows_parts_old |
function_map[23] = get_tv_show_part_video_url |
function_map[24] = show_zee_tv_shows_parts |
function_map[mode](name, url, language, mode, iconimage, bannerimage) |
Copy lines Copy permalink
Global rank | 120 299 |
---|---|
Daily visitors | 9.37K |
Daily pageviews | 9.37K |
Pageviews per user | 1 |
Rating | |
---|---|
Status | Online |
Latest check |
Apalimarathi.com is tracked by us since April, 2011. Over the time it has been ranked as high as 97 199 in the world, while most of its traffic comes from USA, where it reached as high as 27 457 position. It was hosted by Ecommerce Corporation, ISS Ltd and others. While ENOM INC. was its first registrar, now it is moved to eNom Inc..
Apalimarathi has a mediocre Google pagerank and bad results in terms of Yandex topical citation index. We found that Apalimarathi.com is poorly ‘socialized’ in respect to any social network. According to MyWot, Siteadvisor and Google safe browsing analytics, Apalimarathi.com is a fully trustworthy domain with mostly positive visitor reviews.
Apalimarathi.com gets 37.6% of its traffic from USA where it is ranked #55752.
Top Countries
USA | 37.6% |
Taiwan | 17.5% |
United Arab Emirates | 8.3% |
Switzerland | 8.3% |
Saudi Arabia | 7.5% |
Top Ranks
United Arab Emirates | 5 965 |
Taiwan | 9 135 |
Switzerland | 9 166 |
Saudi Arabia | 11 155 |
USA | 55 752 |
Apalimarathi.com has 9.37K visitors and 9.37K pageviews daily.
rank | visitors / pageviews |
---|---|
120297 | pacificleague.jp 22.2K /82.1K |
120298 | clxp.net.cn 13.7K /82.1K |
120299 | apalimarathi.com 9.37K /9.37K |
120300 | bonoov.com 5.48K /36.1K |
120301 | investfunds.ru 7.23K /18.1K |
Apalimarathi.com has no subdomains with considerable traffic.
Apalimarathi.com has Google PR 1 and its top keyword is 'apalimarathi' with 44.94% of search traffic.
-
Yandex CYTop Keywords % of search traffic
apalimarathi | 44.94% |
apali marathi | 6.61% |
aplimarathi | 6.01% |
marathi movies online | 5.27% |
aaplimarathi | 4.76% |
Apalimarathi.com domain is owned by Whois Agent Whois Privacy Protection Service, Inc. and its registration expires in 4 months.
General Get moreApalimarathi.com whois history
Whois Agent Whois Privacy Protection Service, Inc. Owner since November 17, 2013 | ||
---|---|---|
4 months left Expires on September 28, 2019 | 11 years old Created on September 28, 2007 | 9 months ago Changed at September 02, 2018 |
Registrar and Status
Registar | ENOM, LLC |
Status | clientTransferProhibited clienttransferprohibited |
Similar Domain Names
- 1. apali.com
- 2. apaliotomotiv.com
- 3. apalis.de
- 4. apalis.ch
- 5. apalis-webdesign.ch
Apalimarathi.com is hosted by ISS Ltd.
IP Whois Get moreApalimarathi.com server history
ISS Ltd
216.155.153.210
IP address
Server Technologies
Internet Information Services
Backend server
Nameservers
- win1.hostony.net
- win11.fastbighost.com
- win11.fastbighost.net
- win2.hostony.net
- win8.fastbighost.com
host | value | ttl |
---|---|---|
apalimarathi.com | 216.155.153.210 | 86400 |
host | value | ttl | pri |
---|---|---|---|
apalimarathi.com | mail.apalimarathi.com | 86400 | 10 |
host | value | ttl |
---|---|---|
apalimarathi.com | win2.hostony.net | 86390 |
apalimarathi.com | win11.fastbighost.com | 86390 |
apalimarathi.com | win8.fastbighost.net | 86390 |
apalimarathi.com | win11.fastbighost.net | 86390 |
apalimarathi.com | win8.fastbighost.com | 86390 |
apalimarathi.com | win1.hostony.net | 86390 |
host | value | ttl |
---|---|---|
apalimarathi.com | Mname: win11.fastbighost.com | 86400 |
Safety status of Apalimarathi.com is described as follows: MyWOT reports its overall reputation as good, Google Safe Browsing reports its status as safe, while users provide mostly positive reviews (100%).
MyWOT
Overall reputation | Good |
---|---|
Trustworthiness | Good |
Privacy | Good |
Child safety | Excellent |
User reviews
Reputation | Unknown | |
---|---|---|
0 negative |