Cb01: esclusione definitiva articoli di servizio, toonitalia fix sezione aggiornamenti, piccole migliorie

This commit is contained in:
mac12m99
2021-06-26 15:20:05 +02:00
parent 1fe780d7a8
commit c541177310
6 changed files with 17 additions and 15 deletions
+9 -8
View File
@@ -91,13 +91,14 @@ def search(item, text):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
# debug = True
# esclusione degli articoli 'di servizio' # esclusione degli articoli 'di servizio'
curYear = datetime.date.today().year # curYear = datetime.date.today().year
blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', # blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ',
'Aggiornamento Quotidiano Serie TV', 'AVVISO!!!', # 'Aggiornamento Quotidiano Serie TV', 'AVVISO!!!',
'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?', # 'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?',
'OSCAR ' + str(curYear) + ' ▶ VOTA IL TUO FILM PREFERITO! 🎬', # 'OSCAR ' + str(curYear) + ' ▶ VOTA IL TUO FILM PREFERITO! 🎬',
'Auguri di Buon Natale e Felice Anno Nuovo! – ' + str(curYear) + '!'] # 'Auguri di Buon Natale e Felice Anno Nuovo! – ' + str(curYear) + '!']
if 'newest' in item.args: if 'newest' in item.args:
pagination = '' pagination = ''
@@ -110,11 +111,11 @@ def peliculas(item):
action = 'episodios' action = 'episodios'
elif '/serietv/' not in item.url: elif '/serietv/' not in item.url:
patron = r'<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z/]+)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&‖“]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?' patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z/]+)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&‖“]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
action = 'findvideos' action = 'findvideos'
else: else:
patron = r'card-image[^>]*>\s*<a href=(?:")?(?P<url>[^" >]+)(?:")?\s*>\s*<img src=(?:")?(?P<thumb>[^" ]+)(?:")? alt="(?P<title>.*?)(?: &#8211; \d+&#215;\d+)?(?:"| &#8211; )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>[^>]+>[^>]+>[^>]*>[^>]+>[^>]+>[^>]*>[^>]+>[^>]+>[^>]*>[^>]+>[^>]+>[^>]*>(?P<genre>[^\(]+)\((?P<year>\d{4})[^>]*>[^>]+>[^>]+>[^>]+>(?:<p>)?(?P<plot>[^<]+)' patron = r'(?<!sticky )hentry.*?card-image[^>]*>\s*<a href=(?:")?(?P<url>[^" >]+)(?:")?\s*>\s*<img src=(?:")?(?P<thumb>[^" ]+)(?:")? alt="(?P<title>.*?)(?: &#8211; \d+&#215;\d+)?(?:"| &#8211; )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>[^>]+>[^>]+>[^>]*>[^>]+>[^>]+>[^>]*>[^>]+>[^>]+>[^>]*>[^>]+>[^>]+>[^>]*>(?P<genre>[^\(]+)\((?P<year>\d{4})[^>]*>[^>]+>[^>]+>[^>]+>(?:<p>)?(?P<plot>[^<]+)'
action = 'episodios' action = 'episodios'
item.contentType = 'tvshow' item.contentType = 'tvshow'
+3
View File
@@ -105,6 +105,7 @@ def episodios(item):
# debugBlock = True # debugBlock = True
return locals() return locals()
@support.scrape @support.scrape
def genres(item): def genres(item):
info(item) info(item)
@@ -119,9 +120,11 @@ def genres(item):
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">' patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
patronMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>' patronMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
# debugBlock = True
return locals() return locals()
def search(item, text): def search(item, text):
info(text) info(text)
import uuid import uuid
+1 -1
View File
@@ -71,7 +71,7 @@ def peliculas(item):
#patron = r'href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"' #patron = r'href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
patron = r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<[^>]+>[^>]+>\s*<div' patron = r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<[^>]+>[^>]+>\s*<div'
elif item.args == 'last': elif item.args == 'last':
patronBlock = 'Aggiornamenti</h2>(?P<block>.*)</ul>' patronBlock = '(?:Aggiornamenti|Update)</h2>(?P<block>.*?)</ul>'
patron = r'<a href="(?P<url>[^"]+)">\s*<img[^>]+src[set]{0,3}="(?P<thumbnail>[^ ]+)[^>]+>\s*<span[^>]+>(?P<title>[^<]+)' patron = r'<a href="(?P<url>[^"]+)">\s*<img[^>]+src[set]{0,3}="(?P<thumbnail>[^ ]+)[^>]+>\s*<span[^>]+>(?P<title>[^<]+)'
else: else:
patronBlock = '<main[^>]+>(?P<block>.*)</main>' patronBlock = '<main[^>]+>(?P<block>.*)</main>'
+1 -1
View File
@@ -34,7 +34,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# support.dbg() # support.dbg()
url = data.get('result',{}).get('playlist') url = data.get('result',{}).get('playlist')
video_urls.append([url.split('.')[-1], url + '|Referer:' + page_url]) video_urls.append([url.split('.')[-1], url + '|Referer=' + page_url])
return video_urls return video_urls
+2 -4
View File
@@ -2,12 +2,10 @@
# -------------------------------------------------------- # --------------------------------------------------------
# Conector playtube By Alfa development Group # Conector playtube By Alfa development Group
# -------------------------------------------------------- # --------------------------------------------------------
import re
import codecs
from core import httptools from core import httptools
from core import scrapertools from core import scrapertools
from lib import jsunpack from lib import jsunpack
from platformcode import logger from platformcode import logger, config
def test_video_exists(page_url): def test_video_exists(page_url):
@@ -24,6 +22,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
video_urls = [] video_urls = []
pack = scrapertools.find_single_match(data.data, 'p,a,c,k,e,d.*?</script>') pack = scrapertools.find_single_match(data.data, 'p,a,c,k,e,d.*?</script>')
unpacked = jsunpack.unpack(pack) unpacked = jsunpack.unpack(pack)
url = scrapertools.find_single_match(unpacked, 'file:"([^"]+)') + "|referer=%s" %(page_url) url = scrapertools.find_single_match(unpacked, 'file:"([^"]+)') + "|Referer=%s" % page_url
video_urls.append(['m3u8 [PlayTube]', url] ) video_urls.append(['m3u8 [PlayTube]', url] )
return video_urls return video_urls
+1 -1
View File
@@ -11,7 +11,7 @@ def test_video_exists(page_url):
data = httptools.downloadpage(page_url).data data = httptools.downloadpage(page_url).data
if 'File was deleted' in data: if 'File was deleted' in data:
return False, config.get_localized_string(70449) % 'YouDbox' return False, config.get_localized_string(70449) % 'YouDbox'
return True return True, ""
def get_video_url(page_url, video_password): def get_video_url(page_url, video_password):