Example #1
0
def make_request_post():
    url = 'https://account.hotstar.com/AVS/besc?action=Login&appVersion=5.0.30'
    username = Addon.getSetting('username')
    password = Addon.getSetting('password')
    headers = {
        'User-Agent':
        'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36',
        'Referer': 'http://www.hotstar.com',
        'Origin': 'http://www.hotstar.com',
        'Content-Type': 'application/x-www-form-urlencoded'
    }
    body = {'username': username, 'password': password, 'channel': 'TABLET'}
    body = urllib.urlencode(body)
    try:
        response = s.post(url, headers=headers, data=body, verify=False)
        # cookieString = ''
        # c = response.cookies
        # i = c.items()
        # for name2, value in i:
        # cookieString+= name2 + "=" + value + ";"
        # Addon.setSetting('cookieString', i)
        # time.sleep(1)
        return "done"
    except urllib2.URLError, e:
        print
Example #2
0
def changes():
	installed = Addon.getSetting('version')
	if installed != addon_version:
		f = xbmcvfs.File(xbmcaddon.Addon().getAddonInfo('changelog'))
		text = f.read(); f.close()
		
		# xbmc.log(text)
		
		label = '%s - %s' % (xbmc.getLocalizedString(24054), xbmcaddon.Addon().getAddonInfo('name'))
		id = 10147
		xbmc.executebuiltin('ActivateWindow(%d)' % id)
		xbmc.sleep(500)
		
		win = xbmcgui.Window(id)
		retry = 50
		# win.getControl(5).setText(text)
		while (retry > 0):
			try:
				xbmc.sleep(10)
				win.getControl(1).setLabel(label)
				win.getControl(5).setText(text)
				retry = 0
			except:
				retry -= 1

		Addon.setSetting('version', addon_version)
Example #3
0
def get_free_movies():
	html2 = make_request(url)
	html = json.loads(html2)
	content_id=''
	for r in html['contents']:
		if '1' in r['content_type_id']:
			content_id = r['content_id']
			name = r['title']
	if content_id:
		userurl = 'https://erosnow.com/secured/dologin'
		req = make_request_post(userurl)
		movieurl2 = 'http://erosnow.com/profiles/'+str(content_id)+'?platform=2&q=auto'
		html3 = make_request(movieurl2)
		html4 = json.loads(html3)
		req2 = json.loads(req)
		item2 = xbmcgui.ListItem(name)
		if (str(req2['success']['plan']) == 'False'):
			movie_link = html4['profiles']['ADAPTIVE_SD'][0]
		else:
			movie_link = html4['profiles']['ADAPTIVE_ALL'][0]
			subYes = Addon.getSetting('subType')
			if (subYes=='true') and (html4.get('subtitles')):
				closedcaption=[]
				closedcaption.append(html4['subtitles']['eng']['url'])
				subpath = convert_subtitles(closedcaption)
				item2.setSubtitles([subpath])
		
		item2.setProperty('IsPlayable', 'true')
		item2.setPath(movie_link['url'])
		xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item2)
	else:
		dialog.notification('Error', 'Movie may not be released yet.', xbmcgui.NOTIFICATION_INFO, 6000)
Example #4
0
def changes():
    installed = Addon.getSetting('version')
    if installed != addon_version:
        f = xbmcvfs.File(xbmcaddon.Addon().getAddonInfo('changelog'))
        text = f.read()
        f.close()

        # xbmc.log(text)

        label = '%s - %s' % (xbmc.getLocalizedString(24054),
                             xbmcaddon.Addon().getAddonInfo('name'))
        id = 10147
        xbmc.executebuiltin('ActivateWindow(%d)' % id)
        xbmc.sleep(500)

        win = xbmcgui.Window(id)
        retry = 50
        # win.getControl(5).setText(text)
        while (retry > 0):
            try:
                xbmc.sleep(10)
                win.getControl(1).setLabel(label)
                win.getControl(5).setText(text)
                retry = 0
            except:
                retry -= 1

        Addon.setSetting('version', addon_version)
Example #5
0
def make_request_post():
	url = 'https://account.hotstar.com/AVS/besc?action=Login&appVersion=5.0.30'
	username = Addon.getSetting('username')
	password = Addon.getSetting('password')
	headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36', 'Referer':'http://www.hotstar.com', 'Origin':'http://www.hotstar.com', 'Content-Type':'application/x-www-form-urlencoded'}
	body = {'username':username, 'password':password, 'channel':'TABLET'}
	body = urllib.urlencode(body)
	try:
		response = s.post(url, headers=headers, data=body, verify=False)
		# cookieString = ''
		# c = response.cookies
		# i = c.items()
		# for name2, value in i:
			# cookieString+= name2 + "=" + value + ";"
		# Addon.setSetting('cookieString', i)
		# time.sleep(1)
		return "done"
	except urllib2.URLError, e:
		print
Example #6
0
def make_request_post(url):
	username = (Addon.getSetting('username'))
	password = (Addon.getSetting('password'))
	# ipaddressUK="31.7."
	# for x in xrange(1,2):
		# ipaddressUK += ".".join(map(str,(random.randint(0,255) for _ in range(2))))
	
	if (username != '' and password != ''):
		body = {'el':username, 'pw':password, 'mobile':'', 'callingcode':'', 'type':'json', 'fbid':''}
		body = urllib.urlencode(body)
		try:
			s.headers['Referer']='http://erosnow.com'
			# s.headers['X-Forwarded-For']=ipaddressUK
			s.headers['Content-Type']= 'application/x-www-form-urlencoded; charset=UTF-8'
			response = s.post(url, headers=headers, data=body, cookies=s.cookies, verify=False)
			data = response.text
			return data
		except urllib2.URLError, e:
			print
Example #7
0
import re, os, sys
import urllib
import urllib2
import xbmcplugin
import xbmcgui
import xbmcaddon
from addon.common.addon import Addon
import sqlite3
import socket
import requests
import random

addon_id = 'plugin.video.ditto-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting('debug')

socket.setdefaulttimeout(30)
pluginhandle = int(sys.argv[1])
addonDir = xbmc.translatePath(Addon.getAddonInfo('path'))
profile = xbmc.translatePath(Addon.getAddonInfo('profile'))
local_db = os.path.join(profile, 'local_db.db')
pluginDir = sys.argv[0]
dialog = xbmcgui.Dialog()

language = (Addon.getSetting('langType'))
tvsort = (Addon.getSetting('tvsortType'))
moviessort = (Addon.getSetting('moviessortType'))
quality = (Addon.getSetting('qualityType')).lower()

base_url = 'http://www.dittotv.com'
Example #8
0
#

import requests, json, re, os, random
import xbmc
import xbmcplugin
import xbmcgui
import xbmcaddon
import urllib
import urllib2
from addon.common.addon import Addon

addon_id = 'plugin.video.erosnow-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)

language = (Addon.getSetting('langType')).lower()

dialog = xbmcgui.Dialog()

if (language=='all'):
	language2 = ''
else:
	language2 = 'language='+language[0:3]+'&'

USERAGENT   = 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0'
headers = {'User-Agent': USERAGENT, 'Accept':"*/*", 'Accept-Encoding':'gzip,deflate,br', 'Accept-Language':'en-US,en;q=0.8', 'X-Requested-With':'XMLHttpRequest'}
	
s=requests.Session()

def cleanHex(text):
    def fixup(m):
Example #9
0
def get_live_video_url():
    videos = []
    params = []
    addon_log(url)
    quality = (Addon.getSetting('qualityType')).lower()
    html = make_request(url)
    data = html
    html = json.loads(data)
    manifest1 = html['resultObj']['src']
    addon_log('manifest1 is, ' + manifest1)

    # cookieString = ""
    # c = s.cookies
    # i = c.items()
    # for name2, value in i:
    # cookieString+= name2 + "=" + value + ";"
    # print 'cookieString is', cookieString

    # high_video = manifest1
    if enableip == 'true':
        s2 = requests.Session()
        high_video = manifest1  #+"|Cookie="+cookieString+"X-Forwarded-For="+ipaddress+"&Referer=http://www.hotstar.com/fox-news-breaking-news-latest-updates/1000102697&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162"
        headers = {
            'Accept':
            'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
            'Accept-Encoding': 'gzip, deflate, sdch',
            'Connection': 'keep-alive',
            'User-Agent':
            'AppleCoreMedia/1.0.0.12B411 (iPhone; U; CPU OS 8_1 like Mac OS X; en_gb)',
            'X-Forwarded-For': ipaddress
        }
        response = s.get(high_video,
                         headers=headers,
                         cookies=s2.cookies,
                         verify=False)
        # html = make_request(high_video)
        matchlist2 = re.compile("BANDWIDTH=(\d+)\s+(http.+?m3u8)").findall(
            response.content)
        hdnea = s.cookies.get_dict()['hdnea']
        alid = s.cookies.get_dict()['_alid_']
        cookieString = ""
        c = s.cookies
        i = c.items()
        for name2, value in i:
            cookieString += name2 + "=" + value + ";"
        print 'cookieString is', cookieString
        videos = []
        if matchlist2:
            addon_log('inside matchlist2 to separate size,video')
            for (size, video) in matchlist2:
                if size:
                    size = int(size)
                else:
                    size = 0
                videos.append([size, video])

        videos.sort(key=lambda L: L and L[0], reverse=True)

        # +hdnea+";&"
        if videos:
            raw3_start = videos[4][1]
            high_video = raw3_start + "|Cookie=_alid_=" + alid + ";hdnea=" + hdnea + ";&X-Forwarded-For=" + ipaddress + "&Referer=http://www.hotstar.com/fox-news-breaking-news-latest-updates/1000102697&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162&Connection=keep-alive&Accept-Encoding=gzip&Range=bytes=0-100000&Icy-MetaData=0"
            # high_video = raw3_start+"|X-Forwarded-For="+ipaddress+"&Referer=http://www.hotstar.com/fox-news-breaking-news-latest-updates/1000102697&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162&Connection=keep-alive&Accept-Encoding=gzip&Range=&Icy-MetaData="
            print 'full high_video is', high_video

    # addon_log("cookieString2 is, "+cookieString2)
    # print "cookieString2 is ", cookieString2

    # print 's cookies under request are', s.cookies.get_dict()

    listitem = xbmcgui.ListItem(name)
    listitem.setPath(high_video)
    xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)

    setView('movies', 'movie-view')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Example #10
0
import re, os, sys
import urllib
import urllib2
import xbmcplugin
import xbmcgui
import xbmcaddon
from addon.common.addon import Addon
import sqlite3
import socket
import requests
import random

addon_id = 'plugin.video.ditto-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting('debug')

socket.setdefaulttimeout(30)
pluginhandle = int(sys.argv[1])
addonDir = xbmc.translatePath(Addon.getAddonInfo('path'))
profile = xbmc.translatePath(Addon.getAddonInfo('profile'))
local_db = os.path.join(profile, 'local_db.db')
pluginDir = sys.argv[0]
dialog = xbmcgui.Dialog()

language = (Addon.getSetting('langType'))
tvsort = (Addon.getSetting('tvsortType'))
moviessort = (Addon.getSetting('moviessortType'))
quality = (Addon.getSetting('qualityType')).lower()

base_url = 'http://www.dittotv.com'
Example #11
0
import urllib
import urllib2
import json
import requests
import xbmc
import xbmcplugin
import xbmcgui
import xbmcaddon
from addon.common.addon import Addon
import datetime
import time

addon_id = 'plugin.video.retrobox'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting('debug')

language = (Addon.getSetting('langType')).lower()
perpage = (Addon.getSetting('perPage'))
moviessortType = (Addon.getSetting('moviessortType')).lower()
enableip = (Addon.getSetting('EnableIP'))
ipaddress = (Addon.getSetting('ipaddress'))
quality = (Addon.getSetting('qualityType')).lower()

dialog = xbmcgui.Dialog()

if moviessortType == 'name':
    moviessortType = 'title+asc'
elif moviessortType == 'newest':
    moviessortType = 'last_broadcast_date+desc'  #,year+desc,title+asc'
else:
Example #12
0
def get_video_url():
	videos = []
	params = []
	addon_log(url)
	quality = (Addon.getSetting('qualityType')).lower()
	html = make_request(url)
	data = html
	html = json.loads(data)
	manifest1 = html['resultObj']['src']
	addon_log('manifest1 is, '+manifest1)
	islive=False
	if '/videos/' not in manifest1:
		islive=True
		quality='let me choose'
	if 'manifest.f4m' in manifest1:
		manifest1 = manifest1.replace('http://','https://')
		manifest1 = manifest1.replace('/z/','/i/')
		manifest1 = manifest1.replace('manifest.f4m', 'master.m3u8')
	if (quality=='highest' and '1300,2000' in manifest1):
		manifest2 = manifest1.replace('1300,2000', '3000,4500')
		manifest_url = make_request(manifest2)
		# print manifest_url
		if 'EXTM3U' in manifest_url:
			matchlist2 = re.compile("x(\d+).+?(http.+?)\n", re.DOTALL).findall(str(manifest_url))
			manifest1 = None
			if matchlist2:
				for (size, video) in matchlist2:
					if size:
						size = int(size)
					else:
						size = 0
					videos.append( [size, video] )
		else:
			manifest1 = manifest2.replace('3000,4500', '1300,2000')

	if manifest1:
		manifest_url = make_request(manifest1)
		addon_log('quality is '+quality)
		addon_log(manifest_url)
		if (manifest_url):
			if (quality=='highest' or quality=='let me choose'):
				matchlist2 = re.compile("x(\d+).+?(http.+?)\n", re.DOTALL).findall(str(manifest_url))
			elif (quality == '720p'):
				matchlist2 = re.compile("x(720)[^\n]*\n([^\n]*)", re.DOTALL).findall(str(manifest_url))
			elif (quality == '404p'):
				matchlist2 = re.compile("x(404).+?(http.+?)\n", re.DOTALL).findall(str(manifest_url))
			else:
				matchlist2 = re.compile("x(360).+?(http.+?)\n", re.DOTALL).findall(str(manifest_url))
			if matchlist2:
				addon_log('inside matchlist2 to separate size,video')
				for (size, video) in matchlist2:
					addon_log(size+'======'+video)
					if size:
						size = int(size)
					else:
						size = 0
					videos.append( [size, video] )
		else:
			videos.append( [-2, match] )

	videos.sort(key=lambda L : L and L[0], reverse=True)
	
	cookieString = ""
	c = s.cookies
	i = c.items()
	for name2, value in i:
		cookieString+= name2 + "=" + value + ";"
	# print 'cookieString is', cookieString

	if (quality == 'let me choose'):
		for video in videos:
			addon_log(video[1])
			size = '(' + str(video[0]) + 'p) '
			if enableip=='true':
				if 'index_1364_av' in video[1]:
					old_size = size
					size = '(720p) '
					old_vid = video[1]
					new_vid = video[1].replace('index_1364_av', 'index_2064_av')
					addDir(0, size + name, new_vid+"|Cookie="+cookieString+"&X-Forwarded-For="+ipaddress, image, isplayable=True)
					addDir(0, old_size + name, old_vid+"|Cookie="+cookieString+"&X-Forwarded-For="+ipaddress, image, isplayable=True)
				else:
					addDir(0, size + name, video[1]+"|Cookie="+cookieString+"&X-Forwarded-For="+ipaddress, image, isplayable=True)
			else:
				if 'index_1364_av' in video[1]:
					old_size = size
					size = '[COLOR green][720p][/COLOR] '
					old_vid = video[1]
					new_vid = video[1].replace('index_1364_av', 'index_2064_av')
					addDir(0, size + name, new_vid+"|Cookie="+cookieString, image, isplayable=True)
					addDir(0, old_size + name, old_vid+"|Cookie="+cookieString, image, isplayable=True)
				else:
					addDir(0, size + name, video[1]+"|Cookie="+cookieString, image, isplayable=True)
	else:
		if videos:
			raw3_start = videos[0][1]
			if enableip=='true':
				high_video = raw3_start+"|Cookie="+cookieString+"&X-Forwarded-For="+ipaddress
			else:
				high_video = raw3_start+"|Cookie="+cookieString
			print 'high_video is: ',high_video
			listitem =xbmcgui.ListItem(name)
			listitem.setPath(high_video)
			xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
		else:
			movie_id = 'IP issue?'
			dialog.notification("No Video Links available", movie_id, xbmcgui.NOTIFICATION_INFO, 4000)

	setView('movies', 'movie-view')
	xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=True)	
Example #13
0
def get_video_url():
    videos = []
    params = []
    addon_log(url)
    quality = (Addon.getSetting('qualityType')).lower()
    html = make_request(url)
    data = html
    html = json.loads(data)
    manifest1 = html['resultObj']['src']
    addon_log('manifest1 is, ' + manifest1)
    islive = False
    if '/videos/' not in manifest1:
        islive = True
        quality = 'let me choose'
    if 'manifest.f4m' in manifest1:
        manifest1 = manifest1.replace('http://', 'https://')
        manifest1 = manifest1.replace('/z/', '/i/')
        manifest1 = manifest1.replace('manifest.f4m', 'master.m3u8')
    if (quality == 'highest' and '1300,2000' in manifest1):
        manifest2 = manifest1.replace('1300,2000', '3000,4500')
        manifest_url = make_request(manifest2)
        # print manifest_url
        if 'EXTM3U' in manifest_url:
            matchlist2 = re.compile("x(\d+).+?(http.+?)\n",
                                    re.DOTALL).findall(str(manifest_url))
            manifest1 = None
            if matchlist2:
                for (size, video) in matchlist2:
                    if size:
                        size = int(size)
                    else:
                        size = 0
                    videos.append([size, video])
        else:
            manifest1 = manifest2.replace('3000,4500', '1300,2000')

    if manifest1:
        manifest_url = make_request(manifest1)
        addon_log('quality is ' + quality)
        addon_log(manifest_url)
        if (manifest_url):
            if (quality == 'highest' or quality == 'let me choose'):
                matchlist2 = re.compile("x(\d+).+?(http.+?)\n",
                                        re.DOTALL).findall(str(manifest_url))
            elif (quality == '720p'):
                matchlist2 = re.compile("x(720)[^\n]*\n([^\n]*)",
                                        re.DOTALL).findall(str(manifest_url))
            elif (quality == '404p'):
                matchlist2 = re.compile("x(404).+?(http.+?)\n",
                                        re.DOTALL).findall(str(manifest_url))
            else:
                matchlist2 = re.compile("x(360).+?(http.+?)\n",
                                        re.DOTALL).findall(str(manifest_url))
            if matchlist2:
                addon_log('inside matchlist2 to separate size,video')
                for (size, video) in matchlist2:
                    addon_log(size + '======' + video)
                    if size:
                        size = int(size)
                    else:
                        size = 0
                    videos.append([size, video])
        else:
            videos.append([-2, match])

    videos.sort(key=lambda L: L and L[0], reverse=True)

    cookieString = ""
    c = s.cookies
    i = c.items()
    for name2, value in i:
        cookieString += name2 + "=" + value + ";"
    # print 'cookieString is', cookieString

    if (quality == 'let me choose'):
        for video in videos:
            addon_log(video[1])
            size = '(' + str(video[0]) + 'p) '
            if enableip == 'true':
                if 'index_1364_av' in video[1]:
                    old_size = size
                    size = '(720p) '
                    old_vid = video[1]
                    new_vid = video[1].replace('index_1364_av',
                                               'index_2064_av')
                    addDir(0,
                           size + name,
                           new_vid + "|Cookie=" + cookieString +
                           "&X-Forwarded-For=" + ipaddress,
                           image,
                           isplayable=True)
                    addDir(0,
                           old_size + name,
                           old_vid + "|Cookie=" + cookieString +
                           "&X-Forwarded-For=" + ipaddress,
                           image,
                           isplayable=True)
                else:
                    addDir(0,
                           size + name,
                           video[1] + "|Cookie=" + cookieString +
                           "&X-Forwarded-For=" + ipaddress,
                           image,
                           isplayable=True)
            else:
                if 'index_1364_av' in video[1]:
                    old_size = size
                    size = '[COLOR green][720p][/COLOR] '
                    old_vid = video[1]
                    new_vid = video[1].replace('index_1364_av',
                                               'index_2064_av')
                    addDir(0,
                           size + name,
                           new_vid + "|Cookie=" + cookieString,
                           image,
                           isplayable=True)
                    addDir(0,
                           old_size + name,
                           old_vid + "|Cookie=" + cookieString,
                           image,
                           isplayable=True)
                else:
                    addDir(0,
                           size + name,
                           video[1] + "|Cookie=" + cookieString,
                           image,
                           isplayable=True)
    else:
        if videos:
            raw3_start = videos[0][1]
            if enableip == 'true':
                high_video = raw3_start + "|Cookie=" + cookieString + "&X-Forwarded-For=" + ipaddress
            else:
                high_video = raw3_start + "|Cookie=" + cookieString
            print 'high_video is: ', high_video
            listitem = xbmcgui.ListItem(name)
            listitem.setPath(high_video)
            xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
        else:
            movie_id = 'IP issue?'
            dialog.notification("No Video Links available", movie_id,
                                xbmcgui.NOTIFICATION_INFO, 4000)

    setView('movies', 'movie-view')
    xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=True)
Example #14
0
def get_live_video_url():
	videos = []
	params = []
	addon_log(url)
	quality = (Addon.getSetting('qualityType')).lower()
	html = make_request(url)
	data = html
	html = json.loads(data)
	manifest1 = html['resultObj']['src']
	addon_log('manifest1 is, '+manifest1)
	
	# cookieString = ""
	# c = s.cookies
	# i = c.items()
	# for name2, value in i:
		# cookieString+= name2 + "=" + value + ";"
	# print 'cookieString is', cookieString

	# high_video = manifest1
	if enableip=='true':
		s2 = requests.Session()
		high_video = manifest1#+"|Cookie="+cookieString+"X-Forwarded-For="+ipaddress+"&Referer=http://www.hotstar.com/fox-news-breaking-news-latest-updates/1000102697&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162"
		headers = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding':'gzip, deflate, sdch', 'Connection':'keep-alive', 'User-Agent':'AppleCoreMedia/1.0.0.12B411 (iPhone; U; CPU OS 8_1 like Mac OS X; en_gb)', 'X-Forwarded-For': ipaddress}
		response = s.get(high_video, headers=headers, cookies=s2.cookies, verify=False)
		# html = make_request(high_video)
		matchlist2 = re.compile("BANDWIDTH=(\d+)\s+(http.+?m3u8)").findall(response.content)
		hdnea = s.cookies.get_dict()['hdnea']
		alid = s.cookies.get_dict()['_alid_']
		cookieString = ""
		c = s.cookies
		i = c.items()
		for name2, value in i:
			cookieString+= name2 + "=" + value + ";"
		print 'cookieString is', cookieString
		videos=[]
		if matchlist2:
				addon_log('inside matchlist2 to separate size,video')
				for (size, video) in matchlist2:
					if size:
						size = int(size)
					else:
						size = 0
					videos.append( [size, video] )
					
		videos.sort(key=lambda L : L and L[0], reverse=True)
		
		# +hdnea+";&"
		if videos:
			raw3_start = videos[4][1]
			high_video = raw3_start+"|Cookie=_alid_="+alid+";hdnea="+hdnea+";&X-Forwarded-For="+ipaddress+"&Referer=http://www.hotstar.com/fox-news-breaking-news-latest-updates/1000102697&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162&Connection=keep-alive&Accept-Encoding=gzip&Range=bytes=0-100000&Icy-MetaData=0"
			# high_video = raw3_start+"|X-Forwarded-For="+ipaddress+"&Referer=http://www.hotstar.com/fox-news-breaking-news-latest-updates/1000102697&User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162&Connection=keep-alive&Accept-Encoding=gzip&Range=&Icy-MetaData="
			print 'full high_video is', high_video
	
	# addon_log("cookieString2 is, "+cookieString2)
	# print "cookieString2 is ", cookieString2
	
	# print 's cookies under request are', s.cookies.get_dict()
	
	listitem =xbmcgui.ListItem(name)
	listitem.setPath(high_video)
	xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)

	setView('movies', 'movie-view')
	xbmcplugin.endOfDirectory(int(sys.argv[1]))	
Example #15
0
import urllib2
import json
import requests
import xbmc
import xbmcplugin
import xbmcgui
import xbmcaddon
import xbmcvfs
from addon.common.addon import Addon
import datetime

addon_id = 'plugin.video.hotstar-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
addon_version = Addon.getAddonInfo('version')
debug = Addon.getSetting('debug')

# language = (Addon.getSetting('langType')).lower()
langTypes = ''
langHindi = (Addon.getSetting('langHindi'))
langEnglish = (Addon.getSetting('langEnglish'))
langMalayalam = (Addon.getSetting('langMalayalam'))
langTamil = (Addon.getSetting('langTamil'))
langBengali = (Addon.getSetting('langBengali'))
langTelugu = (Addon.getSetting('langTelugu'))
langMarathi = (Addon.getSetting('langMarathi'))
langKannada = (Addon.getSetting('langKannada'))
langGujarati = (Addon.getSetting('langGujarati'))
if langHindi != 'false':
    if langTypes != '': langTypes += ',hindi'
    else: langTypes += 'hindi'
Example #16
0
import urllib2
import json
import requests
import xbmc
import xbmcplugin
import xbmcgui
import xbmcaddon
import xbmcvfs
from addon.common.addon import Addon
import datetime

addon_id = 'plugin.video.hotstar-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
addon_version = Addon.getAddonInfo('version')
debug = Addon.getSetting('debug')

# language = (Addon.getSetting('langType')).lower()
langTypes=''
langHindi = (Addon.getSetting('langHindi'))
langEnglish = (Addon.getSetting('langEnglish'))
langMalayalam = (Addon.getSetting('langMalayalam'))
langTamil = (Addon.getSetting('langTamil'))
langBengali = (Addon.getSetting('langBengali'))
langTelugu = (Addon.getSetting('langTelugu'))
langMarathi = (Addon.getSetting('langMarathi'))
langKannada = (Addon.getSetting('langKannada'))
langGujarati = (Addon.getSetting('langGujarati'))
if langHindi!='false': 
	if langTypes!='': langTypes+=',hindi' 
	else: langTypes+='hindi'
Example #17
0
import re, os, sys
import urllib
import urllib2
import json
import requests
import xbmc
import xbmcplugin
import xbmcgui
import xbmcaddon
from addon.common.addon import Addon
import datetime

addon_id = 'plugin.video.hotstar-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting('debug')

language = (Addon.getSetting('langType')).lower()
perpage = (Addon.getSetting('perPage'))
moviessortType = (Addon.getSetting('moviessortType')).lower()
ipaddress = (Addon.getSetting('ipaddress'))
quality = (Addon.getSetting('qualityType')).lower()


if moviessortType=='name':
	moviessortType='title+asc'
elif moviessortType=='newest':
	moviessortType='last_broadcast_date+desc'#,year+desc,title+asc'
else:
	moviessortType='counter+desc'
	
Example #18
0
import urllib2
import xbmcplugin
import xbmcgui
import xbmcaddon
from addon.common.addon import Addon
import time
import base64, json
import pyaes
import sqlite3
import socket


addon_id = "plugin.video.DesiTVLive"
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting("debug")

socket.setdefaulttimeout(30)
pluginhandle = int(sys.argv[1])
addonDir = xbmc.translatePath(Addon.getAddonInfo("path"))
profile = xbmc.translatePath(Addon.getAddonInfo("profile"))
local_db = os.path.join(profile, "local_db.db")
pluginDir = sys.argv[0]
dialog = xbmcgui.Dialog()

language = (Addon.getSetting("langType")).lower()
tvsort = (Addon.getSetting("tvsortType")).lower()
moviessort = (Addon.getSetting("moviessortType")).lower()
ipaddress = Addon.getSetting("ipaddress")

base_url = "http://origin.dittotv.com"