diff options
Diffstat (limited to 'plugin.video.montreal.greek-tv/resources/lib/youtube.py')
-rw-r--r-- | plugin.video.montreal.greek-tv/resources/lib/youtube.py | 9 |
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 |