|
@@ -462,8 +462,24 @@ X-Requested-With: XMLHttpRequest
|
462
|
462
|
r = self._http_request(url,headers=self.headers2)
|
463
|
463
|
if not r:
|
464
|
464
|
return content
|
465
|
|
- m = re.search('<div class="movie_titles"><div class="en">([^<]+)</div>', r)
|
466
|
|
- raidijums = m.group(1) if m else "Series"
|
|
465
|
+ m = re.search(r'data-movieid=\d+><div class="lv">([^<]+)</div><div[^>]+>([^<]+)<', r)
|
|
466
|
+ if m:
|
|
467
|
+ title1 = unescape(m.group(1))
|
|
468
|
+ title2 = unescape(m.group(2))
|
|
469
|
+ else:
|
|
470
|
+ m = re.search('<meta name="dr:say:title" content="([^"]+)">', r, re.IGNORECASE)
|
|
471
|
+ title1 = title2 = unescape(m.group(1)) if m else "Video"
|
|
472
|
+ if 'episode_switcher_title' in r:
|
|
473
|
+ set1 = title1.replace("\xe2\x80\x93", "-")
|
|
474
|
+ if " - " in set1:
|
|
475
|
+ set1 = set1.split(" - ")[0]
|
|
476
|
+ set2 = title2.replace("\xe2\x80\x93", "-")
|
|
477
|
+ if " - " in set2:
|
|
478
|
+ set2 = set2.split(" - ")[0]
|
|
479
|
+ raidijums = "%s ~ %s" % (set1, set2)
|
|
480
|
+ else:
|
|
481
|
+ m = re.search('<div class="movie_titles"><div class="en">([^<]+)</div>', r)
|
|
482
|
+ raidijums = m.group(1) if m else "Series"
|
467
|
483
|
img0 = re.search('<meta name="og:image" content="([^"]+)">', r).group(1) if re.search('<meta name="dr:say:img" content="([^"]+)">', r) else ""
|
468
|
484
|
m = re.search('season_choice', r)
|
469
|
485
|
|
|
@@ -497,7 +513,7 @@ X-Requested-With: XMLHttpRequest
|
497
|
513
|
raise Exception("Error getting episode list")
|
498
|
514
|
result = re.findall(r'class="" href="([^"]+)".+?image:url\(([^ \)]+)\); "></div><div class="episode_titlez_design17">([^<]+)</div><div class="episode_number_design17">([^<]+)</div></a>', js["data"])
|
499
|
515
|
for item in result:
|
500
|
|
- title = "%s - %s(%s)"%(raidijums,item[2],item[3])
|
|
516
|
+ title = "%s - %s (%s)"%(raidijums,item[2],item[3])
|
501
|
517
|
data2 = item[0][1:]
|
502
|
518
|
img = "https://www.shortcut.lv"+item[1]
|
503
|
519
|
desc = title
|
|
@@ -911,33 +927,31 @@ Host: manstv.lattelecom.tv
|
911
|
927
|
tt = lambda p,r,d: re.search(p,r).group(1) if re.search(p,r) else d
|
912
|
928
|
tt2 = lambda p,r,d: (re.sub("[\.]","",re.search(p,r).group(1))).split(", ") if re.search(p,r) else d
|
913
|
929
|
r = self.call2(data)
|
914
|
|
- m = re.search(r'"movie_titles" data-movieid=(\d+)><div class="en">([^<]+)</div><div class="lv translated">([^<]+)</div>', r)
|
|
930
|
+ m = re.search(r'data-movieid=\d+><div class="lv">([^<]+)</div><div[^>]+>([^<]+)<', r)
|
915
|
931
|
if m:
|
916
|
|
- title1 = unescape(m.group(2))
|
917
|
|
- title2 = unescape(m.group(3))
|
|
932
|
+ title1 = unescape(m.group(1))
|
|
933
|
+ title2 = unescape(m.group(2))
|
918
|
934
|
else:
|
919
|
935
|
m = re.search('<meta name="dr:say:title" content="([^"]+)">', r, re.IGNORECASE)
|
920
|
936
|
title1 = title2 = unescape(m.group(1)) if m else "Video"
|
921
|
|
- nfo["title"] = title2
|
922
|
|
- nfo["originaltitle"] = title1
|
|
937
|
+ nfo["title"] = title1
|
|
938
|
+ nfo["originaltitle"] = title2
|
923
|
939
|
if nfo["originaltitle"] and not nfo["title"]:
|
924
|
940
|
nfo["title"] = nfo["originaltitle"]
|
925
|
941
|
if 'episode_switcher_title' in r:
|
926
|
|
- title2 = title2.replace("\xe2\x80\x93", "-")
|
927
|
|
- if " - " in title2:
|
928
|
|
- nfo["set"] = title2.split(" - ")[0]
|
929
|
|
- else:
|
930
|
|
- nfo["set"] = tt('<div class="movie_titles"><div class="en">(.+?)<', r, title2)
|
931
|
|
- m = re.search('<div class="serial_switcher_banner active".+?<div class="episode_titlez_design17">([^<]+)</div><div class="episode_number_design17">([^<]+)</div>', r)
|
932
|
|
- if m:
|
933
|
|
- ep1 = m.group(1)
|
934
|
|
- ep2 = m.group(2)
|
935
|
|
- nfo["title"] = "%s - %s(%s)"%(nfo["set"], ep1, ep2)
|
936
|
|
- nfo["originaltitle"] = nfo["originaltitle"] + "(%s)" % ep2
|
937
|
|
- m = re.search("S(\d+)E(\d+)", ep2)
|
|
942
|
+ set1 = title1.replace("\xe2\x80\x93", "-")
|
|
943
|
+ if " - " in set1:
|
|
944
|
+ set1 = set1.split(" - ")[0]
|
|
945
|
+ set2 = title2.replace("\xe2\x80\x93", "-")
|
|
946
|
+ if " - " in set2:
|
|
947
|
+ set2 = set2.split(" - ")[0]
|
|
948
|
+ nfo["set"] = "%s ~ %s" % (set1, set2)
|
|
949
|
+ m = re.search(r"<br>(S(\d+)E(\d+))<", r, re.IGNORECASE | re.DOTALL)
|
938
|
950
|
if m:
|
939
|
|
- nfo["season"] = m.group(1)
|
940
|
|
- nfo["eposode"] = m.group(2)
|
|
951
|
+ #nfo["title"] = nfo["title"] + " (%s)" % m.group(1)
|
|
952
|
+ #nfo["originaltitle"] = nfo["originaltitle"] + " (%s)" % m.group(1)
|
|
953
|
+ nfo["season"] = m.group(2)
|
|
954
|
+ nfo["episode"] = m.group(2)
|
941
|
955
|
|
942
|
956
|
nfo["thumb"] = tt('<meta name="og:image" content="([^"]+)"', r,"")
|
943
|
957
|
nfo["thumb"] = nfo["thumb"].replace("http:", "https:")
|
|
@@ -945,11 +959,11 @@ Host: manstv.lattelecom.tv
|
945
|
959
|
nfo["runtime"] = tt('movie-informatio-title">Garums<.+?content">([^<]+)<', r, "")
|
946
|
960
|
nfo["quality"] = tt('movie-informatio-title">Kvalitāte<.+?content">([^<]+)<', r, "")
|
947
|
961
|
nfo["genre"]=tt('movie-informatio-title">Žanrs<.+?content">([^<]+)<', r, "")
|
948
|
|
- nfo["director"] = tt('movie-informatio-title">Režisors<.+?content">([^<]+)<', r, "")
|
949
|
|
- nfo["actor"] = tt2('movie-informatio-title">Aktieri<.+?content">([^<]+)<', r, "")
|
|
962
|
+ nfo["director"] = tt('movie-informatio-title">Režisor.<.+?content">([^<]+)<', r, "")
|
|
963
|
+ nfo["actor"] = tt2('class="movie-informatio-content actors">([^<]+)<', r, "")
|
950
|
964
|
nfo["language"] = tt2('movie-informatio-title">Valodas*<.+?content">([^<]+)<', r, "")
|
951
|
965
|
nfo["subtitles"] = tt2('movie-informatio-title">Subtitri<.+?content">([^<]+)<', r, "")
|
952
|
|
- nfo["plot"] = tt('movie-informatio-title">Apraksts<.+?content">([^<]+)<', r, "")
|
|
966
|
+ nfo["plot"] = tt('class="movie-informatio-content introduction">([^<]+)<', r, "")
|
953
|
967
|
nfo["tagline"] = nfo["plot"]
|
954
|
968
|
return nfo
|
955
|
969
|
|