This commit is contained in:
deathbybandaid 2022-01-28 07:40:01 -05:00
parent 8bfe28e397
commit 14fcd6488d

View File

@ -1,4 +1,5 @@
import json import json
import requests
class Plugin_OBJ(): class Plugin_OBJ():
@ -29,23 +30,23 @@ class Plugin_OBJ():
'referer': 'https://www.distro.tv/live', 'referer': 'https://www.distro.tv/live',
'accept-language': 'en-US,en;q=0.9' 'accept-language': 'en-US,en;q=0.9'
} }
"""
chan_req = self.plugin_utils.web.session.get(channels_url, headers=url_headers, data=payload) chan_req = self.plugin_utils.web.session.get(channels_url, headers=url_headers, data=payload)
data = json.loads(chan_req.content) data = json.loads(chan_req.content)
print(data) print(data)
channel_list = []
return channel_list
""" """
response = requests.request("GET", url, headers=headers, data = payload).content
channel_list = []
response = requests.request("GET", channels_url, headers=url_headers, data=payload).content
data = json.loads(response) data = json.loads(response)
topics = data['topics'] topics = data['topics']
for t in topics: for t in topics:
title = t['title'] title = t['title']
Type = t['type'] Type = t['type']
if Type == "live": if Type == "live":
addDir(title,title,3,addon_icon,addon_fanart,title) print(title)
"""
return channel_list
channels_url = "https://ustvgo.tv/tvguide/national.json" channels_url = "https://ustvgo.tv/tvguide/national.json"