예제 #1
0
def apply_filter(filters):
	API_URL = 'http://www.einthusan.com/webservice/filters.php'
	result = HTTPInterface.http_post(API_URL, data=filters)
	response_json = {}
	try:
		response_json = json.loads(result)
	except ValueError:
		xbmc.log("Value Error: Error when decoding JSON", level=LOGERROR)
		xbmc.log(result, level=LOGERROR)
	return  response_json
예제 #2
0
def apply_filter(filters):
    API_URL = 'https://einthusan.ca/webservice/filters.php'
    result = HTTPInterface.http_post(API_URL, data=filters)
    response_json = {}
    try:
        response_json = json.loads(result)
    except ValueError:
        print "Value Error: Error when decoding JSON"
        print result
    return response_json
예제 #3
0
def apply_filter(filters):
	API_URL = 'http://www.einthusan.com/webservice/filters.php'
	result = HTTPInterface.http_post(API_URL, data=filters)
	response_json = {}
	try:
		response_json = json.loads(result)
	except ValueError:
		print "Value Error: Error when decoding JSON"
		print result
	return  response_json
def get_options(attr, language):
	API_URL = 'http://www.einthusan.com/webservice/discovery.php'
	data = 'lang='+language

	html = HTTPInterface.http_post(API_URL, data=data)
	result = json.loads(html)
	try:
		return result['organize'][attr]['filtered']
	except KeyError, e:
		print "Key Error "  
		return {}
예제 #5
0
def get_list():
	login_url = 'http://www.einthusan.com/webservice/filters.php'
	form_data = {}
	form_data['lang'] = 'tamil'
	form_data['organize'] = 'Rating'
	form_data['filtered'] = 'Comedy'

	result = HTTPInterface.http_post(login_url, form_data)

	a = json.loads(result)
	test = a['results']

	print get_video_detail(50)
예제 #6
0
def get_options(attr, language):
	API_URL = 'http://www.einthusan.com/webservice/discovery.php'
	data = 'lang='+language

	html = HTTPInterface.http_post(API_URL, data=data)
	result = {}
	try:
		result = json.loads(html)
		return result['organize'][attr]['filtered']
	except KeyError:
		print "Key Error "  
	except ValueError:
		print "Value Error: Error when decoding JSON"
		print html
	return {}
예제 #7
0
def get_options(attr, language):
	API_URL = 'http://www.einthusan.com/webservice/discovery.php'
	data = 'lang='+language

	html = HTTPInterface.http_post(API_URL, data=data)
	result = {}
	try:
		print result
		result = json.loads(html)
		return result['organize'][attr]['filtered']
	except KeyError:
		print "Key Error "  
	except ValueError:
		print "Value Error: Error when decoding JSON"
		print html
	return {}
예제 #8
0
def get_options(attr, language):
	API_URL = 'http://www.einthusan.com/webservice/discovery.php'
	data = 'lang='+language

	html = HTTPInterface.http_post(API_URL, data=data)
	result = {}
	try:
		xbmc.log(result, xbmc.LOGINFO)
		result = json.loads(html)
		return result['organize'][attr]['filtered']
	except KeyError:
		xbmc.log("Key Error ", xmbc.LOGERROR)
	except ValueError:
		xbmc.log("Value Error: Error when decoding JSON", xbmc.LOGERROR)
		xbmc.log(html, xbmc.LOGERROR)
	return {}
def apply_filter(filters):
	API_URL = 'http://www.einthusan.com/webservice/filters.php'
	result = HTTPInterface.http_post(API_URL, data=filters)
	return  json.loads(result)