summaryrefslogtreecommitdiff
path: root/plugin.video.montreal.greek-tv/resources/lib/youtube.py
diff options
context:
space:
mode:
authorUnknown <twilight@freemail.gr>2017-12-28 15:56:25 +0200
committerMartijn Kaijser <martijn@xbmc.org>2018-01-13 10:21:46 +0100
commitb38d9847cd804f0abf749146b74124b76393e76b (patch)
tree60511d1d3fd9d5f618de19331da7ee6720878cdd /plugin.video.montreal.greek-tv/resources/lib/youtube.py
parentf9ce3563b9342732be922c4486a74685ef499fc0 (diff)
[plugin.video.montreal.greek-tv] 1.3.1
Remove forgotten file [plugin.video.montreal.greek-tv] 1.3.0
Diffstat (limited to 'plugin.video.montreal.greek-tv/resources/lib/youtube.py')
-rw-r--r--plugin.video.montreal.greek-tv/resources/lib/youtube.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugin.video.montreal.greek-tv/resources/lib/youtube.py b/plugin.video.montreal.greek-tv/resources/lib/youtube.py
index ecd7e45..7fd224a 100644
--- a/plugin.video.montreal.greek-tv/resources/lib/youtube.py
+++ b/plugin.video.montreal.greek-tv/resources/lib/youtube.py
@@ -85,6 +85,7 @@ class youtube(object):
return self.list
def video_list(self, cid, url, pagination):
+
try:
result = requests.get(url).text
result = json.loads(result)
@@ -139,8 +140,11 @@ class youtube(object):
threads.append(workers.Thread(self.thread, u[i], i))
self.data.append('')
- [i.start() for i in threads]
- [i.join() for i in threads]
+ for i in threads:
+ i.start()
+
+ for i in threads:
+ i.join()
items = []
for i in self.data:
@@ -180,6 +184,7 @@ class youtube(object):
return self.list
def thread(self, url, i):
+
try:
result = requests.get(url).text
self.data[i] = result