fix altadefinizione (#452)
This commit is contained in:
+15
-19
@@ -10,18 +10,17 @@ from platformcode import config, logger
|
|||||||
|
|
||||||
def findhost(url):
|
def findhost(url):
|
||||||
host = support.match(url, patron=r'<h2[^>]+><a href="([^"]+)').match.rstrip('/')
|
host = support.match(url, patron=r'<h2[^>]+><a href="([^"]+)').match.rstrip('/')
|
||||||
return host
|
permUrl = httptools.downloadpage(host, follow_redirects=False).headers
|
||||||
|
return permUrl['location']
|
||||||
|
|
||||||
host = config.get_channel_url(findhost)
|
host = config.get_channel_url(findhost)
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
|
||||||
film = ['/category/film/',
|
film = ['',
|
||||||
('Al Cinema', ['/prime-visioni/', 'peliculas']),
|
('Al Cinema', ['/category/ora-al-cinema/', 'peliculas']),
|
||||||
('Generi', ['', 'genres']),
|
('Generi', ['', 'genres']),
|
||||||
# ('Sub-ITA', ['/sub-ita/', 'peliculas'])
|
# ('Sub-ITA', ['/sub-ita/', 'peliculas'])
|
||||||
]
|
]
|
||||||
@@ -37,9 +36,9 @@ def mainlist(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def genres(item):
|
def genres(item):
|
||||||
action = 'peliculas'
|
action = 'peliculas'
|
||||||
blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
|
blacklist = ['Scegli il Genere', 'Film', 'Serie Tv', 'Sub-Ita', 'Anime', "Non reperibile", 'Anime Sub-ITA', 'Prossimamente',]
|
||||||
patronMenu = r'<a href="(?P<url>[^"]+)" class="category-button">(?P<title>[^<]+)'
|
patronBlock = r'(?<=<ul class="listSubCat" id="Film">)(?P<block>.*?)(?=<\/ul>)'
|
||||||
'<a href="https://altadefinizione.archi/category/film/animazione/" class="category-button">Animazione</a>'
|
patron = r'<a href=\"(?P<url>https:\/\/.*?)\"> (?P<title>.*?) </a>'
|
||||||
|
|
||||||
def itemlistHook(itemlist):
|
def itemlistHook(itemlist):
|
||||||
itl = []
|
itl = []
|
||||||
@@ -52,8 +51,7 @@ def genres(item):
|
|||||||
|
|
||||||
def search(item, text):
|
def search(item, text):
|
||||||
logger.debug(text)
|
logger.debug(text)
|
||||||
item.url = "{}/search/{}/feed/rss2/".format(host, text)
|
item.url = "{}/?s={}".format(host, text)
|
||||||
# item.url = "{}/s={}".format(host, text)
|
|
||||||
item.args = 'search'
|
item.args = 'search'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -70,11 +68,11 @@ def search(item, text):
|
|||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
item.contentType = "undefined"
|
item.contentType = "undefined"
|
||||||
action = 'check'
|
action = 'check'
|
||||||
patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){5}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h1>'
|
patron = r'<h2 class=\"titleFilm\"><a href=\"(?P<url>[^\"]+)\">(?P<title>[a-zA-Z\d\s’–:\.-]*)\s*\[?(?P<quality>[a-zA-Z]*)\]?\s*\(?(?P<year>[0-9]*)\)?'
|
||||||
# if item.args == 'search':
|
|
||||||
# patron = r'<item>\s*<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
|
if item.args == 'search':
|
||||||
|
patron = r'<div class="col-lg-3 col-md-3 [^>]*> <a href=\"(?P<url>[^\"]+)\">.*?(?=<h5).*?(?=>)>(?P<title>[a-zA-Z\d\s’–:\.\'-]*)\s*\[?(?P<quality>[a-zA-Z]*)\]?\s*\(?(?P<year>[0-9]*)\)?'
|
||||||
patronNext = r'href="([^"]+)[^>]+>Successivo'
|
patronNext = r'href="([^"]+)[^>]+>Successivo'
|
||||||
# debug = True
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -83,9 +81,7 @@ def episodios(item):
|
|||||||
item.quality = ''
|
item.quality = ''
|
||||||
data = item.data
|
data = item.data
|
||||||
action='findvideos'
|
action='findvideos'
|
||||||
# debugBlock=True
|
patron = r'<div class="episode-wrap".*?(?=<li class="season-no">).*?(?=>)>(?P<episode>[^<]+).*?(?=<a)<a href="(?P<url>[^\"]+).*?(?=>)>(?P<title>[a-zA-Z\d\s’–:\.\'-]*)'
|
||||||
patronBlock = r'<h2>[Ss]tagione: (?P<season>\d+)(?P<block>.*?)</ul>'
|
|
||||||
patron = r'<a href="(?P<url>[^"]+).*?[Ee]pisodio N°: (?P<episode>\d+)'
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -100,11 +96,11 @@ def check(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.debug()
|
logger.debug()
|
||||||
# support.dbg()
|
#support.dbg()
|
||||||
if not item.data:
|
if not item.data:
|
||||||
item.data = httptools.downloadpage(item.url).data
|
item.data = httptools.downloadpage(item.url).data
|
||||||
data = item.data
|
data = item.data
|
||||||
if item.contentType == 'movie' and isinstance(item.data, str):
|
if item.contentType == 'movie' and isinstance(item.data, str):
|
||||||
data = support.match(support.match(item.data, patron=r'iframe src="([^"]+)').match).data
|
data = support.match(support.match(item.data, patron=r'<div class="embed-player" data-id=\"(https://.*?)\"').match).data
|
||||||
item.data = ''
|
item.data = ''
|
||||||
return support.server(item, data)
|
return support.server(item, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user