def peliculas(item): if item.contentType == 'movie': patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*([0-9.]+)<\/div><span class="quality">([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/a>[^>]+>[^>]+>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<div' return support.scrape( item, patron, ['url', 'thumb', 'rating', 'quality', 'title', 'year', 'plot'], headers, patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"') elif item.contentType == 'tvshow': patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> ([0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>([^<]+)<.*?<div class="texto">([^<]+)' return support.scrape( item, patron, ['url', 'thumb', 'rating', 'title', 'year', 'plot'], headers, action='episodios', patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"') else: patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>' return support.scrape( item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={ 'movie': ['Film'], 'tvshow': ['TV'] }, type_action_dict={ 'findvideos': ['Film'], 'episodios': ['TV'] })
def video(item): logger.info('[filmsenzalimiti.py] video') itemlist = [] patron = '<div class="col-mt-5 postsh">.*?<a href="([^"]+)" title="([^"]+)">.*?<span class="rating-number">(.*?)<.*?<img src="([^"]+)"' patronNext = '<a href="([^"]+)"><i class="glyphicon glyphicon-chevron-right"' support.scrape(item, itemlist, patron, ['url', 'title', 'rating', 'thumb'], patronNext=patronNext) return itemlist
def peliculas(item): support.log() if item.contentType == 'movie' or '/serietv/' not in item.url: patron = r'<div class="?card-image"?>.*?<img src="?([^" ]+)"? alt.*?<a href="?([^" >]+)(?:\/|")>([^<[(]+)(?:\[([A-Za-z0-9/-]+)])? (?:\(([0-9]{4})\))?.*?<strong>([^<>&]+).*?DURATA ([0-9]+).*?<br(?: /)?>([^<>]+)' listGroups = [ 'thumb', 'url', 'title', 'quality', 'year', 'genre', 'duration', 'plot' ] action = 'findvideos' else: patron = r'div class="card-image">.*?<img src="([^ ]+)" alt.*?<a href="([^ >]+)">([^<[(]+)<\/a>.*?<strong><span style="[^"]+">([^<>0-9(]+)\(([0-9]{4}).*?</(?:p|div)>(.*?)</div' listGroups = ['thumb', 'url', 'title', 'genre', 'year', 'plot'] action = 'episodios' return support.scrape( item, patron_block=[ r'<div class="?sequex-page-left"?>(.*?)<aside class="?sequex-page-right"?>', '<div class="?card-image"?>.*?(?=<div class="?card-image"?>|<div class="?rating"?>)' ], patron=patron, listGroups=listGroups, patronNext= '<a class="?page-link"? href="?([^>]+)"?><i class="fa fa-angle-right">', blacklist=blacklist, action=action)
def generos(item): patron = '<a href="([^"#]+)">([a-zA-Z]+)' return support.scrape( item, patron, ['url', 'title'], patron_block='<a href="#">Genere</a><ul class="sub-menu">.*?</ul>', action='peliculas')
def last(item): return scrape( item, r'<li><a href="([^"]+)"[^>]+>([^<]+)(\d+)<br>', ['url', 'title', 'episode'], patron_block= '<ul class="last" id="recentAddedEpisodesAnimeDDM">(.*?)</ul>')
def episodios(item): itemlist = scrape( item, r'<li><a href="([^"]+)"[^<]+<b>(.*?)<\/b>[^>]+>([^<]+)<\/i>', ['url', 'title', 'title2'], patron_block='<div class="seasonEp">(.*?)<div class="footer">') return renumber(itemlist, item, 'bold')
def genres(item): return support.scrape( item, patron_block=r'<div id="bordobar" class="dropdown-menu(.*?)</li>', patron=r'<a class="dropdown-item" href="([^"]+)" title="([A-z]+)"', listGroups=['url', 'title'], action='video')
def peliculas_list(item): support.log() item.fulltitle = '' block = r'<tbody>(.*)<\/tbody>' patron = r'<a href="([^"]+)" title="([^"]+)".*?> <img.*?src="([^"]+)".*?<td class="mlnh-3">([0-9]{4}).*?mlnh-4">([A-Z]+)' return support.scrape(item, patron, ['url', 'title', 'thumb', 'year', 'quality'], patron_block=block)
def categorie(item): log() return support.scrape( item, r'<li>\s<a\shref="([^"]+)"[^>]+>([^<]+)</a></li>', ['url', 'title'], patron_block=r'<ul\sclass="dropdown-menu category">(.*?)</ul>', headers=headers, action="lista_serie")
def year(item): findhost() patron = r'<a href="([^"#]+)">(\d+)' return support.scrape( item, patron, ['url', 'title'], patron_block='<a href="#">Anno</a><ul class="sub-menu">.*?</ul>', action='peliculas')
def AZlist(item): support.log() return support.scrape( item, r'<a title="([^"]+)" href="([^"]+)"', ['title', 'url'], headers, patron_block=r'<div class="movies-letter">(.*?)<\/div>', action='peliculas_list')
def newest(categoria): findhost() itemlist = [] item = Item() item.contentType = 'movie' item.url = host + '/lista-film-ultimi-100-film-aggiunti/' return support.scrape(item, r'<a href=([^>]+)>([^<([]+)(?:\[([A-Z]+)\])?\s\(([0-9]{4})\)<\/a>', ['url', 'title', 'quality', 'year'], patron_block=r'Ultimi 100 film aggiunti:.*?<\/td>')
def categorie(item): log() patron_block = r'<h2>Sfoglia</h2>\s*<ul>(.*?)</ul>\s*</section>' patron = r'<li><a href="([^"]+)">([^<]+)</a></li>' return support.scrape(item, patron, ['url', 'title'], patron_block=patron_block, action='lista_serie', blacklist=["Home Page", "Calendario Aggiornamenti"])
def generi(item): log() patron_block = r'</i>\sGeneri</a>\s*<ul class="sub">(.*?)</ul>' patron = r'<a href="([^"]+)"\stitle="([^"]+)">' return support.scrape(item, patron, ['url', 'title'], patron_block=patron_block, action='video')
def peliculas(item): itemlist = scrape( item, r'Lingua[^<]+<br>\s*<a href="(?:Lista episodi )?([^"]+)" title="(?:Lista episodi )?(.*?)(?: \(([0-9]+)\))?(?: Streaming)?">', ['url', 'title', 'year'], action='episodios', patron_block= '<input type="submit" value="Vai!" class="blueButton">(.*?)<div class="footer">', patronNext='<li class="currentPage">[^>]+><li[^<]+<a href="([^"]+)">') return renumber(itemlist)
def genre(item): itemlist = support.scrape(item, '<a href="([^"]+)">([^<]+)</a>', ['url', 'title'], headers, [ 'Serie TV', 'Serie TV Americane', 'Serie TV Italiane', 'altadefinizione' ], action='peliculas') return thumb(itemlist)
def peliculas(item): item.contentType = 'tvshow' return support.scrape( item, r'<h2>(.*?)</h2>\s*<img src="([^"]+)" alt="[^"]*" />\s*<A HREF="([^"]+)">.*?<span class="year">([0-9]{4}).*?<span class="calidad">([A-Z]+)', ['title', 'thumb', 'url', 'year', 'quality'], headers, patronNext= r"<span class='current'>\d+</span><a rel='nofollow' class='page larger' href='([^']+)'>\d+</a>", action='episodios')
def categories(item): support.log(item) itemlist = support.scrape( item, '<li><a href="([^"]+)">(.*?)</a></li>', ['url', 'title'], headers, 'Altadefinizione01', patron_block='<ul class="kategori_list">(.*?)</ul>', action='peliculas') return support.thumb(itemlist)
def menu(item): patron_block = r'<ul class="sub-menu">.*?</ul>' patron = r'menu-category-list"><a href="([^"]+)">([^<]+)<' list_groups = ["url", "title"] return support.scrape(item, patron, list_groups, blacklist="Anime", action="peliculas_menu", patron_block=patron_block)
def peliculas(item): support.log() if item.extra == 'search': patron = r'<a href="([^"]+)">\s*<div class="wrapperImage">(?:<span class="hd">([^<]+)<\/span>)?<img[^s]+src="([^"]+)"[^>]+>[^>]+>[^>]+>([^<]+)<[^<]+>(?:.*?IMDB:\s([^<]+)<\/div>)?' elements = ['url', 'quality', 'thumb', 'title', 'rating'] else: patron = r'<img width[^s]+src="([^"]+)[^>]+><\/a>.*?<a href="([^"]+)">([^(?:\]|<)]+)(?:\[([^\]]+)\])?<\/a>[^>]+>[^>]+>[^>]+>(?:\sIMDB\:\s([^<]+)<)?(?:.*?<span class="hd">([^<]+)<\/span>)?\s*<a' elements =['thumb', 'url', 'title','lang', 'rating', 'quality'] itemlist = support.scrape(item, patron, elements, headers, patronNext='<a class="next page-numbers" href="([^"]+)">') return itemlist
def episodios(item): patron = r'<td class="MvTbTtl"><a href="([^"]+)">(.*?)<\/a>.*?>\d{4}<' list_groups = ["url", "title", "year"] itemlist = support.scrape(item, patron, list_groups) for itm in itemlist: fixedtitle = scrapertools.get_season_and_episode(itm.url) itm.title = fixedtitle + " - " + itm.title itm.fulltitle = fixedtitle + " - " + itm.fulltitle return itemlist
def lista_serie(item): log() itemlist = [] patron_block = r'<div\sclass="col-xs-\d+ col-sm-\d+-\d+">(.*?)<div\sclass="container-fluid whitebg" style="">' patron = r'<a\shref="([^"]+)".*?>\s<img\s.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p></div>' return support.scrape(item, patron, ['url', 'thumb', 'title'], patron_block=patron_block, patronNext=r"<link\s.*?rel='next'\shref='([^']*)'", action='episodios')
def episodios(item): ## import web_pdb; web_pdb.set_trace() support.log("episodios") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url).data #======== if 'clicca qui per aprire' in data.lower(): item.url = scrapertoolsV2.find_single_match(data, '"go_to":"([^"]+)"') item.url = item.url.replace("\\", "") # Carica la pagina data = httptools.downloadpage(item.url).data elif 'clicca qui</span>' in data.lower(): item.url = scrapertoolsV2.find_single_match( data, '<h2 style="text-align: center;"><a href="([^"]+)">') # Carica la pagina data = httptools.downloadpage(item.url).data #========= patron = r'(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(ITA|SUB ITA)(?:\))?<\/div>'\ '<div class="su-spoiler-content su-clearfix" style="display:none">|'\ '(?:\s|\Wn)?(?:<strong>)?(\d+&#.*?)(?:|–)?<a\s(.*?)<\/a><br\s\/>)' ## '(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(ITA|SUB ITA)(?:\))?'\ ## '<\/div><div class="su-spoiler-content su-clearfix" style="display:none">|'\ ## '(?:\s|\Wn)?(?:<strong>)?(\d[&#].*?)(?:–|\W)?<a\s(.*?)<\/a><br\s\/>)' ## '(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(ITA|SUB ITA)(?:\))?<\/div>'\ ## '<div class="su-spoiler-content su-clearfix" style="display:none">|'\ ## '\s(?:<strong>)?(\d[&#].*?)–<a\s(.*?)<\/a><br\s\/>)' listGroups = ['lang', 'title', 'url'] itemlist = support.scrape(item, data=data, patron=patron, listGroups=listGroups, action='findvideos') # Permette la configurazione della videoteca senza andare nel menu apposito # così si possono Attivare/Disattivare le impostazioni direttamente dalla # pagina delle puntate itemlist.append( Item( channel='setting', action="channel_config", title=support.typo("Configurazione Videoteca color lime"), plot= 'Filtra per lingua utilizzando la configurazione della videoteca.\ Escludi i video in sub attivando "Escludi streams... " e aggiungendo sub in Parole', config='videolibrary', #item.channel, folder=False, thumbnail=channelselector.get_thumb('setting_0.png'))) itemlist = filtertools.get_links(itemlist, item, list_language) return itemlist
def peliculas(item): log() action = 'findvideos' if item.extra == 'movie' else 'episodios' if item.args == 'movie': patron = r'<div class="mediaWrap mediaWrapAlt">[^<]+<a href="([^"]+)" title="Permalink to\s([^"]+) \(([^<]+)\).*?"[^>]+>[^<]+<img[^s]+src="([^"]+)"[^>]+>[^<]+<\/a>.*?<p>\s*([a-zA-Z-0-9]+)\s*<\/p>' itemlist = support.scrape( item, patron, ['url', 'title', 'year', 'thumb', 'quality'], headers, action=action, patron_block='<div id="main_col">(.*?)main_col', patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">') else: patron = r'<div class="media3">[^>]+><a href="([^"]+)"><img[^s]+src="([^"]+)"[^>]+><\/a><[^>]+><a[^<]+><p>([^<]+) \(([^\)]+)[^<]+<\/p>.*?<p>\s*([a-zA-Z-0-9]+)\s*<\/p>' itemlist = support.scrape( item, patron, ['url', 'thumb', 'title', 'year', 'quality'], headers, action=action, patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">') if item.args == 'anime': autorenumber.renumber(itemlist) return itemlist
def category(item): blacklist = [ 'Serie TV Altadefinizione', 'HD AltaDefinizione', 'Al Cinema', 'Serie TV', 'Miniserie', 'Programmi Tv', 'Live', 'Trailers', 'Serie TV Aggiornate', 'Aggiornamenti', 'Featured' ] itemlist = support.scrape( item, '<li><a href="([^"]+)"><span></span>([^<]+)</a></li>', ['url', 'title'], headers, blacklist, patron_block='<ul class="table-list">(.*?)</ul>', action='peliculas') return support.thumb(itemlist)
def peliculas_src(item): patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>' return support.scrape( item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={ 'movie': ['Film'], 'tvshow': ['TV'] }, type_action_dict={ 'findvideos': ['Film'], 'episodios': ['TV'] })
def search_peliculas(item): logger.info(item.channel + 'search_peliculas') logger.info('TYPE= ' + item.contentType) if item.contentType == 'movie': action = 'findvideos' else: action = 'episodios' return support.scrape( item, r'<a href="([^"]+)"><span[^>]+><[^>]+><\/a>[^h]+h2>(.*?)<', ["url", "title"], patronNext="<a rel='nofollow' class=previouspostslink href='([^']+)'", headers=headers, action=action)
def peliculas(item): support.log itemlist = [] patron = r'class="innerImage">.*?href="([^"]+)".*?src="([^"]+)"'\ '.*?class="ml-item-title">([^<]+)</.*?class="ml-item-label"> (\d{4}) <'\ '.*?class="ml-item-label">.*?class="ml-item-label ml-item-label-.+?"> '\ '(.+?) </div>.*?class="ml-item-label"> (.+?) </' listGroups = ['url', 'thumb', 'title', 'year', 'quality', 'lang'] patronNext = '<span>\d</span> <a href="([^"]+)">' itemlist = support.scrape(item, patron=patron, listGroups=listGroups, headers= headers, patronNext=patronNext, action='findvideos') return itemlist
def serietv(item): #import web_pdb; web_pdb.set_trace() # lista serie tv support.log() itemlist = [] if item.args: # il titolo degli episodi viene inglobato in episode ma non sono visibili in newest!!! patron = r'<span class="serieTitle" style="font-size:20px">(.*?).[^–]<a href="([^"]+)"\s+target="_blank">(.*?)<\/a>' listGroups = ['title', 'url', 'title2'] patronNext = '' else: patron = r'<div class="post-thumb">.*?\s<img src="([^"]+)".*?><a href="([^"]+)".*?>(.*?(?:\((\d{4})\)|(\d{4}))?)<\/a><\/h2>' listGroups = ['thumb', 'url', 'title', 'year', 'year'] patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »</a>' itemlist = support.scrape(item, patron_block='', patron=patron, listGroups=listGroups, patronNext=patronNext, action='episodios') return itemlist
def genres(item): support.log itemlist = [] #data = httptools.downloadpage(item.url, headers=headers).data action = 'peliculas' if item.args == 'genres': bloque = r'<ul class="listSubCat" id="Film">(.*?)</ul>' elif item.args == 'years': bloque = r'<ul class="listSubCat" id="Anno">(.*?)</ul>' elif item.args == 'quality': bloque = r'<ul class="listSubCat" id="Qualita">(.*?)</ul>' elif item.args == 'lucky': # sono i titoli random nella pagina, cambiano 1 volta al dì bloque = r'FILM RANDOM.*?class="listSubCat">(.*?)</ul>' action = 'findvideos' patron = r'<li><a href="([^"]+)">(.*?)<' listGroups = ['url','title'] itemlist = support.scrape(item, patron=patron, listGroups=listGroups, headers= headers, patron_block = bloque, action=action) return itemlist