cb01 supporto alle cartelle vcrypt
This commit is contained in:
+35
-20
@@ -137,32 +137,47 @@ def peliculas(item):
|
|||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
patronBlock = r'(?P<block><div class="sp-head[a-z ]*?" title="Espandi">\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?[^<>]*?<\/div>.*?)<div class="spdiv">\[riduci\]<\/div>'
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
patron = r'(?:/>|<p>|<strong>)(?P<url>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
data = data.replace("'", '"')
|
||||||
def itemlistHook(itemlist):
|
data = re.sub('\n|\t', ' ', data)
|
||||||
title_dict = {}
|
data = re.sub(r'>\s+<', '> <', data)
|
||||||
itlist = []
|
if 'TUTTA LA ' in data:
|
||||||
for item in itemlist:
|
folderUrl = scrapertools.find_single_match(data, 'TUTTA LA \w+\s+(?:–|-)\s+<a href="([^"]+)')
|
||||||
item.title = re.sub(r'\.(\D)',' \\1', item.title)
|
data = httptools.downloadpage(folderUrl).data
|
||||||
match = support.match(item.title, patron=r'(\d+.\d+)').match.replace('x','')
|
patron = r'<a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)'
|
||||||
item.order = match
|
sceneTitle = True
|
||||||
if match not in title_dict:
|
def itemHook(item):
|
||||||
title_dict[match] = item
|
item.serieFolder = True
|
||||||
elif match in title_dict and item.contentLanguage == title_dict[match].contentLanguage \
|
return item
|
||||||
or item.contentLanguage == 'ITA' and not title_dict[match].contentLanguage \
|
else:
|
||||||
or title_dict[match].contentLanguage == 'ITA' and not item.contentLanguage:
|
patronBlock = r'(?P<block><div class="sp-head[a-z ]*?" title="Espandi">\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?[^<>]*?<\/div>.*?)<div class="spdiv">\[riduci\]<\/div>'
|
||||||
title_dict[match].url = item.url
|
patron = r'(?:/>|<p>|<strong>)(?P<url>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
||||||
else:
|
def itemlistHook(itemlist):
|
||||||
title_dict[match + '1'] = item
|
title_dict = {}
|
||||||
|
itlist = []
|
||||||
|
for item in itemlist:
|
||||||
|
item.title = re.sub(r'\.(\D)',' \\1', item.title)
|
||||||
|
match = support.match(item.title, patron=r'(\d+.\d+)').match.replace('x','')
|
||||||
|
item.order = match
|
||||||
|
if match not in title_dict:
|
||||||
|
title_dict[match] = item
|
||||||
|
elif match in title_dict and item.contentLanguage == title_dict[match].contentLanguage \
|
||||||
|
or item.contentLanguage == 'ITA' and not title_dict[match].contentLanguage \
|
||||||
|
or title_dict[match].contentLanguage == 'ITA' and not item.contentLanguage:
|
||||||
|
title_dict[match].url = item.url
|
||||||
|
else:
|
||||||
|
title_dict[match + '1'] = item
|
||||||
|
|
||||||
for key, value in title_dict.items():
|
for key, value in title_dict.items():
|
||||||
itlist.append(value)
|
itlist.append(value)
|
||||||
|
|
||||||
return sorted(itlist, key=lambda it: (it.contentLanguage, int(it.order)))
|
return sorted(itlist, key=lambda it: (it.contentLanguage, int(it.order)))
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
|
if item.serieFolder:
|
||||||
|
return support.server(item, data=item.url)
|
||||||
if item.contentType == "episode":
|
if item.contentType == "episode":
|
||||||
return findvid_serie(item)
|
return findvid_serie(item)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user