|
@@ -110,6 +110,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|
110
|
110
|
if translations[pl].startswith("http"):
|
111
|
111
|
continue
|
112
|
112
|
pl_link = translations[pl]
|
|
113
|
+ lang = pl.encode("utf8")
|
113
|
114
|
break
|
114
|
115
|
else:
|
115
|
116
|
raise Exception("No episodes list found!")
|
|
@@ -222,21 +223,26 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|
222
|
223
|
desc = desc0 = util.unescape(m.group(1).strip()) if m else ""
|
223
|
224
|
m = re.search('itemprop="contentUrl" content="(.+?)"', r, re.IGNORECASE | re.DOTALL)
|
224
|
225
|
if not m:
|
225
|
|
- # #raise Exception("Can not find video link")
|
226
|
|
- return []
|
|
226
|
+ raise Exception("Can not find video link")
|
|
227
|
+ #return []
|
227
|
228
|
video_link = m.group(1)
|
228
|
229
|
series = True if video_link == '{video-link}' else False
|
229
|
230
|
vid = plist[1]
|
230
|
231
|
js = self.get_movie_info(vid)
|
231
|
|
- if js["message"]["translations"]["flash"]:
|
232
|
|
- video_link = js["message"]["translations"]["flash"].values()[0].encode("utf8")
|
233
|
|
- video_link = self.decode_uppod_text(video_link)
|
234
|
|
- lang = js["message"]["translations"]["flash"].keys()[0].encode("utf8") # TODO process several players/streams
|
|
232
|
+ translations = js["message"]["translations"]["flash"]
|
|
233
|
+ for pl in translations:
|
|
234
|
+ if translations[pl].startswith("http"):
|
|
235
|
+ continue
|
|
236
|
+ pl_link = translations[pl]
|
|
237
|
+ lang = pl.encode("utf8")
|
|
238
|
+ break
|
235
|
239
|
else:
|
236
|
|
- return []
|
|
240
|
+ raise Exception("No episodes list found!")
|
|
241
|
+ if not pl_link.startswith("http"):
|
|
242
|
+ pl_link = self.decode_uppod_text(pl_link)
|
237
|
243
|
|
238
|
244
|
if not series : # Filma
|
239
|
|
- url0 = video_link
|
|
245
|
+ url0 = pl_link
|
240
|
246
|
streams2 = self.get_streams2(url0)
|
241
|
247
|
for st in streams2:
|
242
|
248
|
stream = util.item()
|
|
@@ -249,7 +255,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|
249
|
255
|
return streams
|
250
|
256
|
|
251
|
257
|
else: # Seriāls
|
252
|
|
- pl_link = video_link
|
|
258
|
+ #pl_link = video_link
|
253
|
259
|
js = self._http_request(pl_link)
|
254
|
260
|
js = self.decode_uppod_text(js)
|
255
|
261
|
js = json.loads(js)
|