From 9dc8ce1802c001fe1288a606132f79e76c838d09 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 30 Apr 2019 09:51:41 -0400 Subject: [PATCH] Use https for tvlistings.gracenote.com http://tvlistings.gracenote.com redirects to https://tvlistings.gracenote.com so just https directly. It's also more secure. --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index abea865..c6cd790 100644 --- a/main.py +++ b/main.py @@ -1631,7 +1631,7 @@ def select_zap_channels(country, zipcode, device, lineup, headend, add_all=False gridtime = (int(time.mktime(time.strptime(str(datetime.datetime.now().replace(microsecond=0,second=0,minute=0)), '%Y-%m-%d %H:%M:%S')))) - url = 'http://tvlistings.gracenote.com/api/grid?lineupId='+lineup+'×pan=3&headendId=' + headend + '&country=' + country + '&device=' + device + '&postalCode=' + zipcode + '&time=' + str(gridtime) + '&pref=-&userId=-' + url = 'https://tvlistings.gracenote.com/api/grid?lineupId='+lineup+'×pan=3&headendId=' + headend + '&country=' + country + '&device=' + device + '&postalCode=' + zipcode + '&time=' + str(gridtime) + '&pref=-&userId=-' #data = xbmcvfs.File(url,'r').read() data = requests.get(url).content j = json.loads(data) @@ -1730,7 +1730,7 @@ def zap_country(country,i): #label = "%s / %s / %s / %s" % (name,device,lineup,headend) label = name - url = 'http://tvlistings.gracenote.com/api/grid?lineupId='+lineup+'×pan=3&headendId=' + headend + '&country=' + country + '&device=' + device + '&postalCode=' + zipcode + '&pref=-&userId=-' + url = 'https://tvlistings.gracenote.com/api/grid?lineupId='+lineup+'×pan=3&headendId=' + headend + '&country=' + country + '&device=' + device + '&postalCode=' + zipcode + '&pref=-&userId=-' context_items = [] if url not in zaps: @@ -1760,7 +1760,7 @@ def zap_country(country,i): #label = "%s / %s / %s / %s" % (name,device,lineup,headend) label = name - url = 'http://tvlistings.gracenote.com/api/grid?lineupId='+lineup+'×pan=3&headendId=' + headend + '&country=' + country + '&device=' + device + '&postalCode=' + zipcode + '&pref=-&userId=-' + url = 'https://tvlistings.gracenote.com/api/grid?lineupId='+lineup+'×pan=3&headendId=' + headend + '&country=' + country + '&device=' + device + '&postalCode=' + zipcode + '&pref=-&userId=-' context_items = [] if url not in zaps: @@ -2215,4 +2215,4 @@ def index(): plugin.set_view_mode(view_mode) #plugin.set_view_mode(51) #pass - #plugin.set_content("files") \ No newline at end of file + #plugin.set_content("files")