KoD 0.7.1

- A grande richiesta, è ora possibile riprodurre in automatico l'episodio successivo di una serie in libreria
- aggiunta la possibilità di nascondere la lista dei server, quando si usa l'autoplay
- aggiunto canale pufimovies.com
- fix vari
This commit is contained in:
marco
2020-01-20 18:31:32 +01:00
parent 1b63ed4046
commit d585b0e042
81 changed files with 1447 additions and 990 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
"language": ["ita", "sub-ita"],
"active": true,
"adult": false,
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png",
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png",
"thumbnail": "altadefinizione01.png",
"banner": "altadefinizione01.png",
"categories": ["movie", "vos"],
"settings": []
}
+1 -1
View File
@@ -28,7 +28,7 @@ def findhost():
host = config.get_channel_url(findhost)
headers = [['Referer', host]]
list_servers = ['verystream','openload','rapidvideo','streamango']
list_servers = ['mixdrop','vidoza','cloudvideo','vup','supervideo','gounlimited']
list_quality = ['default']
@support.menu
+1 -1
View File
@@ -26,7 +26,7 @@ __channel__ = "altadefinizione01_link"
host = config.get_channel_url()
headers = [['Referer', host]]
list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload']
list_servers = ['mixdrop', 'vup', 'supervideo']
list_quality = ['default']
# =========== home menu ===================
+2 -2
View File
@@ -4,8 +4,8 @@
"active": true,
"adult": false,
"language": ["ita","sub-ita"],
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/altadefinizioneclick.png",
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/altadefinizioneciclk.png",
"thumbnail": "altadefinizioneclick.png",
"bannermenu": "altadefinizioneciclk.png",
"categories": ["movie","vos"],
"settings": []
}
+2 -3
View File
@@ -28,9 +28,8 @@ def findhost():
host = config.get_channel_url(findhost)
headers = [['Referer', host]]
list_servers = ['verystream', 'rapidvideo', 'openload', 'streamango', 'vidoza',
'vidcloud', 'thevideo', 'okru', 'hdload', 'youtube']
list_quality = ['1080p', '720', '360']
list_servers = ['mixdrop', 'vidcloud', 'vidoza', 'supervideo', 'hdload', 'mystream']
list_quality = ['1080p', '720p', '360p']
@support.menu
def mainlist(item):
+91 -52
View File
@@ -3,14 +3,11 @@
# Canale per AnimeForce
# ------------------------------------------------------------
from servers.decrypters import adfly
from core import support
host = support.config.get_channel_url()
IDIOMAS = {'Italiano': 'IT'}
list_language = IDIOMAS.values()
list_servers = ['directo', 'openload', 'vvvvid']
list_servers = ['directo', 'vvvvid']
list_quality = ['default']
@@ -45,47 +42,40 @@ def newest(categoria):
return itemlist
@support.scrape
def search(item, texto):
# debug = True
search = texto
support.log(texto)
item.args = 'noorder'
item.url = host + '/?s=' + texto + '&cat=6010'
item.contentType = 'tvshow'
patron = r'<a href="(?P<url>[^"]+)">\s*<strong[^>]+>(?P<title>[^<]+)<'
action = 'episodios'
return locals()
try:
return peliculas(item)
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.logger.error("%s" % line)
return []
@support.scrape
def peliculas(item):
anime = True
action = 'episodios'
if item.args == 'newest':
patron = r'<a href="(?P<url>[^"]+)">\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: Sub| sub| SUB|")'
action = 'findvideos'
elif item.args == 'last':
patron = r'<a href="(?P<url>[^"]+)">\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: Sub| sub| SUB|")'
if not item.args:
pagination = ''
patron = r'<a\s*href="(?P<url>[^"]+)"\s*title="(?P<title>[^"]+)">'
elif item.args == 'corso':
pagination = ''
patron = r'<strong><a href="(?P<url>[^"]+)">(?P<title>.*?) [Ss][Uu][Bb]'
else:
pagination = ''
patron = r'<a href="(?P<url>[^"]+)">\s*<strong[^>]+>(?P<title>[^<]+)<'
patron = r'<a href="(?P<url>[^"]+)"[^>]+>\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: Sub| sub| SUB|")'
if item.args == 'newest': item.action = 'findvideos'
def itemHook(item):
if 'sub-ita' in item.url:
if item.args != 'newest': item.title = item.title + support.typo('Sub-ITA','_ [] color kod')
item.contentLanguage = 'Sub-ITA'
if item.args == 'newest':
url = support.match(item, '<a href="([^"]+)" title="[^"]+" target="[^"]+" class="btn', headers=headers)[0]
item.url = url[0] if url else ''
delete = support.scrapertools.find_single_match(item.fulltitle, r'( Episodi.*)')
episode = support.scrapertools.find_single_match(item.title, r'Episodi(?:o)? (?:\d+÷)?(\d+)')
item.title = support.typo(episode + ' - ','bold') + item.title.replace(delete,'')
item.fulltitle = item.show = item.title.replace(delete,'')
item.episode = episode
return item
return locals()
@@ -94,9 +84,15 @@ def peliculas(item):
@support.scrape
def episodios(item):
anime = True
patron = r'<td style[^>]+>\s*.*?(?:<span[^>]+)?<strong>(?P<title>[^<]+)<\/strong>.*?<td style[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>'
data = support.match(item, headers=headers).data
if '<h6>Streaming</h6>' in data:
patron = r'<td style[^>]+>\s*.*?(?:<span[^>]+)?<strong>(?P<title>[^<]+)<\/strong>.*?<td style[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>'
else:
patron = r'<a\s*href="(?P<url>[^"]+)"\s*title="(?P<title>[^"]+)"\s*class="btn btn-dark mb-1">'
def itemHook(item):
item.url = item.url.replace(host, '')
support.log(item)
if item.url.startswith('//'): item.url= 'https:' + item.url
elif item.url.startswith('/'): item.url= 'https:/' + item.url
return item
action = 'findvideos'
return locals()
@@ -104,38 +100,81 @@ def episodios(item):
def findvideos(item):
support.log(item)
# try:
# from urlparse import urljoin
# except:
# from urllib.parse import urljoin
# support.dbg()
itemlist = []
if item.episode:
from lib import unshortenit
url, c = unshortenit.unshorten(item.url)
url = support.match(item, r'<a href="([^"]+)"[^>]*>', patronBlock=r'Episodio %s(.*?)</tr>' % item.episode ,url=url)[0]
item.url = url[0] if url else ''
if 'vvvvid' in item.url:
item.action = 'play'
itemlist.append(item)
import requests
from lib import vvvvid_decoder
if support.match(item.url, string=True, patron=r'(\d+/\d+)').match:
item.action = 'play'
itemlist.append(item)
else:
# VVVVID vars
vvvvid_host = 'https://www.vvvvid.it/vvvvid/ondemand/'
vvvvid_headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0'}
if 'http' not in item.url:
if '//' in item.url[:2]:
item.url = 'http:' + item.url
elif host not in item.url:
item.url = host + item.url
# VVVVID session
current_session = requests.Session()
login_page = 'https://www.vvvvid.it/user/login'
conn_id = current_session.get(login_page, headers=vvvvid_headers).json()['data']['conn_id']
payload = {'conn_id': conn_id}
# collect parameters
show_id = support.match(item.url, string=True, patron=r'(\d+)').match
ep_number = support.match(item.title, patron=r'(\d+)').match
json_file = current_session.get(vvvvid_host + show_id + '/seasons/', headers=vvvvid_headers, params=payload).json()
season_id = str(json_file['data'][0]['season_id'])
json_file = current_session.get(vvvvid_host + show_id + '/season/' + season_id +'/', headers=vvvvid_headers, params=payload).json()
# select the correct episode
for episode in json_file['data']:
support.log('Number',int(episode['number']),int(ep_number))
if int(episode['number']) == int(ep_number):
url = vvvvid_decoder.dec_ei(episode['embed_info'] or episode['embed_info'])
if 'youtube' in url: item.url = url
item.url = url.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
if 'https' not in item.url:
url = support.match(item, url='https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/playlist.m3u')[1]
url = url.split()[-1]
itemlist.append(
support.Item(action= 'play',
url= 'https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/' + url,
server= 'directo'))
elif 'adf.ly' in item.url:
from servers.decrypters import adfly
url = adfly.get_long_url(item.url)
if 'adf.ly' in item.url:
item.url = adfly.get_long_url(item.url)
elif 'bit.ly' in item.url:
item.url = support.httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location")
url = support.httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location")
else:
url = host
for u in item.url.split('/'):
# support.log(i)
if u and 'animeforce' not in u and 'http' not in u:
url += '/' + u
if 'php?' in url:
url = support.httptools.downloadpage(url, only_headers=True, follow_redirects=False).headers.get("location")
url = support.match(url, patron=r'class="button"><a href=(?:")?([^" ]+)', headers=headers).match
else:
url = support.match(url, patron=[r'<source src=(?:")?([^" ]+)',r'name="_wp_http_referer" value="([^"]+)"']).match
if url.startswith('//'): url = 'https:' + url
elif url.startswith('/'): url = 'https:/' + url
matches = support.match(item, r'button"><a href="([^"]+)"')[0]
for video in matches:
itemlist.append(
support.Item(channel=item.channel,
action="play",
title='diretto',
url=video,
title='Diretto',
url=url,
server='directo'))
return support.server(item, itemlist=itemlist)
+5 -5
View File
@@ -74,10 +74,10 @@ def peliculas(item):
@support.scrape
def episodios(item):
data = support.match(item, headers=headers)[1]
if not any(x in data for x in ['Lista Episodi', 'Movie Parte']):
data = support.match(item, headers=headers, patronBlock=r'entry-content clearfix">(.*?)class="mh-widget mh-posts-2 widget_text').block
if not 'pagination clearfix' in data:
support.log('NOT IN DATA')
patron = r'(?:iframe src|str)="(?P<url>[^"]+)"'
patron = r'<iframe.*?src="(?P<url>[^"]+)"'
title = item.title
def fullItemlistHook(itemlist):
url = ''
@@ -107,7 +107,7 @@ def episodios(item):
return locals()
def check(item):
data = support.match(item, headers=headers)[1]
data = support.match(item, headers=headers).data
if 'Lista Episodi' not in data:
item.data = data
return findvideos(item)
@@ -120,7 +120,7 @@ def findvideos(item):
if item.data:
data = item.data
else:
matches = support.match(item, '(?:str="([^"]+)"|iframe src="([^"]+)")')[0]
matches = support.match(item, patron=r'<iframe.*?src="(?P<url>[^"]+)"').matches
data = ''
if matches:
for match in matches:
+1 -75
View File
@@ -7,79 +7,5 @@
"thumbnail": "animesaturn.png",
"banner": "animesaturn.png",
"categories": ["anime"],
"settings": [
{
"id": "modo_grafico",
"type": "bool",
"label": "Cerca informazioni extra",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "channel_host",
"type": "text",
"label": "Host del canale",
"default": "https://www.animesaturn.com",
"enabled": true,
"visible": true
},
{
"id": "include_in_global_search",
"type": "bool",
"label": "Includi ricerca globale",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "include_in_newest_anime",
"type": "bool",
"label": "Includi in Novità - Anime",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "include_in_newest_italiano",
"type": "bool",
"label": "Includi in Novità - Italiano",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "checklinks",
"type": "bool",
"label": "Verifica se i link esistono",
"default": false,
"enabled": true,
"visible": true
},
{
"id": "checklinks_number",
"type": "list",
"label": "Numero de link da verificare",
"default": 1,
"enabled": true,
"visible": "eq(-1,true)",
"lvalues": [ "1", "3", "5", "10" ]
},
{
"id": "autorenumber",
"type": "bool",
"label": "@70712",
"default": false,
"enabled": true,
"visible": true
},
{
"id": "autorenumber_mode",
"type": "bool",
"label": "@70688",
"default": false,
"enabled": true,
"visible": "eq(-1,true)"
}
]
"settings": []
}
+27 -14
View File
@@ -6,13 +6,13 @@
from core import support
__channel__ = "animesaturn"
host = support.config.get_setting("channel_host", __channel__)
# __channel__ = "animesaturn"
# host = support.config.get_setting("channel_host", __channel__)
host = support.config.get_channel_url()
headers={'X-Requested-With': 'XMLHttpRequest'}
IDIOMAS = {'Italiano': 'ITA'}
list_language = IDIOMAS.values()
list_servers = ['openload', 'fembed', 'animeworld']
list_servers = ['directo', 'fembed', 'animeworld']
list_quality = ['default', '480p', '720p', '1080p']
@support.menu
@@ -33,6 +33,9 @@ def search(item, texto):
anime = True
patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>[^<|(]+)(?:(?P<lang>\(([^\)]+)\)))?<|\)'
action = 'check'
def itemHook(item):
item.url = item.url.replace('www.','')
return item
return locals()
@@ -58,6 +61,9 @@ def newest(categoria):
def menu(item):
patronMenu = r'u>(?P<title>[^<]+)<u>(?P<url>.*?)</div> </div>'
action = 'peliculas'
def itemHook(item):
item.url = item.url.replace('www.','')
return item
return locals()
@@ -67,7 +73,7 @@ def peliculas(item):
deflang= 'Sub-ITA'
if item.args == 'updated':
post = "page=" + str(item.page if item.page else 1) if item.page > 1 else None
page, data = support.match(item, r'data-page="(\d+)" title="Next">', post=post, headers=headers)
page= support.match(item, patron=r'data-page="(\d+)" title="Next">', post=post, headers=headers).match
patron = r'<img alt="[^"]+" src="(?P<thumb>[^"]+)" [^>]+></div></a>\s*<a href="(?P<url>[^"]+)"><div class="testo">(?P<title>[^\(<]+)(?:(?P<lang>\(([^\)]+)\)))?</div></a>\s*<a href="[^"]+"><div class="testo2">[^\d]+(?P<episode>\d+)</div></a>'
if page: nextpage = page
item.contentType='episode'
@@ -78,17 +84,20 @@ def peliculas(item):
action = 'check'
else:
pagination = ''
if item.args == 'incorso': patron = r'"slider_title" href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)"[^>]+>(?P<title>[^\(<]+)(?:\((?P<year>\d+)\))?</a>'
if item.args == 'incorso': patron = r'"slider_title"\s*href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)"[^>]+>(?P<title>[^\(<]+)(?:\((?P<year>\d+)\))?</a>'
else: patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>.+?)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</span>'
action = 'check'
def itemHook(item):
item.url = item.url.replace('www.','')
return item
return locals()
def check(item):
movie, data = support.match(item, r'Episodi:</b> (\d*) Movie')
anime_id = support.match(data, r'anime_id=(\d+)')[0][0]
movie = support.match(item, patron=r'Episodi:</b> (\d*) Movie')
anime_id = support.match(movie.data, patron=r'anime_id=(\d+)').match
item.url = host + "/loading_anime?anime_id=" + anime_id
if movie:
if movie.match:
item.contentType = 'movie'
episodes = episodios(item)
if len(episodes) > 0: item.url = episodes[0].url
@@ -102,16 +111,20 @@ def check(item):
def episodios(item):
if item.contentType != 'movie': anime = True
patron = r'<strong" style="[^"]+">(?P<title>[^<]+)</b></strong></td>\s*<td style="[^"]+"><a href="(?P<url>[^"]+)"'
def itemHook(item):
item.url = item.url.replace('www.','')
return item
return locals()
def findvideos(item):
support.log()
itemlist = []
urls = support.match(item, r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers)[0]
# support.dbg()
urls = support.match(item, patron=r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers, debug=False).matches
if urls:
links = support.match(item, r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', url=urls[0], headers=headers)[0]
for link in links:
links = support.match(urls[0].replace('www.',''), patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers, debug=False)
for link in links.matches:
itemlist.append(
support.Item(channel=item.channel,
action="play",
@@ -123,7 +136,7 @@ def findvideos(item):
show=item.show,
contentType=item.contentType,
folder=False))
return support.server(item, itemlist=itemlist)
return support.server(item, links, itemlist=itemlist)
+23 -29
View File
@@ -34,7 +34,7 @@ def newest(categoria):
if itemlist[-1].action == "ultimiep":
itemlist.pop()
# Continua l'esecuzione in caso di errore
# Continua l'esecuzione in caso di errore
except:
import sys
for line in sys.exc_info():
@@ -50,7 +50,7 @@ def search(item, texto):
item.args = 'alt'
try:
return peliculas(item)
# Continua la ricerca in caso di errore
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
@@ -67,10 +67,9 @@ def genres(item):
@support.scrape
def peliculas(item):
def peliculas(item):
anime = True
if item.args == 'updated':
#patron = r'<div class="post-thumbnail">\s*<a href="(?P<url>[^"]+)" title="(?P<title>.*?)\s*(?P<episode>Episodio \d+)[^"]+"[^>]*>\s*<img[^src]+src="(?P<thumb>[^"]+)"'
patron = r'<div class="post-thumbnail">\s*<a href="(?P<url>[^"]+)" title="(?P<title>.*?)\s*Episodio (?P<episode>\d+) (?P<lang>[a-zA-Z-\s]+)[^"]*"> <img[^src]+src="(?P<thumb>[^"]+)"'
patronNext = r'<link rel="next" href="([^"]+)"\s*/>'
action = 'findvideos'
@@ -98,32 +97,27 @@ def findvideos(item):
itemlist = []
if item.args == 'updated':
ep = support.match(item.fulltitle,r'(Episodio\s*\d+)')[0][0]
item.url = support.re.sub(r'episodio-\d+-|oav-\d+-', '',item.url)
ep = support.match(item.fulltitle, patron=r'(\d+)').match
item.url = support.re.sub(r'episodio-\d+-|oav-\d+-'+ep, '',item.url)
if 'streaming' not in item.url: item.url = item.url.replace('sub-ita','sub-ita-streaming')
item.url = support.match(item, r'<a href="([^"]+)"[^>]+>', ep + '(.*?)</tr>', )[0][0]
item.url = support.match(item, patron= ep + r'[^>]+>[^>]+>[^>]+><a href="([^"]+)"').match
urls = support.match(item.url, r'(episodio\d*.php.*)')[0]
for url in urls:
url = host + '/' + url
headers['Referer'] = url
data = support.match(item, headers=headers, url=url)[1]
cookies = ""
matches = support.re.compile('(.%s.*?)\n' % host.replace("http://", "").replace("www.", ""), support.re.DOTALL).findall(support.config.get_cookie_data())
for cookie in matches:
cookies += cookie.split('\t')[5] + "=" + cookie.split('\t')[6] + ";"
# post
url = host + '/' + support.match(item.url, patron=r'(episodio\d*.php.*?)"').match.replace('%3F','?').replace('%3D','=')
headers['Referer'] = url
cookies = ""
matches = support.re.compile('(.%s.*?)\n' % host.replace("http://", "").replace("www.", ""), support.re.DOTALL).findall(support.config.get_cookie_data())
for cookie in matches:
cookies += cookie.split('\t')[5] + "=" + cookie.split('\t')[6] + ";"
headers['Cookie'] = cookies[:-1]
headers['Cookie'] = cookies[:-1]
url = support.match(data, r'<source src="([^"]+)"[^>]+>')[0][0] + '|' + support.urllib.urlencode(headers)
itemlist.append(
support.Item(channel=item.channel,
action="play",
title='diretto',
quality='',
url=url,
server='directo',
fulltitle=item.fulltitle,
show=item.show))
url = support.match(url, patron=r'<source src="([^"]+)"[^>]+>').match
return support.server(item,url,itemlist)
itemlist.append(
support.Item(channel=item.channel,
action="play",
title='Diretto',
url=url + '|' + support.urllib.urlencode(headers),
server='directo'))
return support.server(item,itemlist=itemlist)
+2 -2
View File
@@ -98,11 +98,11 @@ def episodios(item):
def findvideos(item):
itemlist=[]
if item.args == 'last':
match = support.match(item, r'href="(?P<url>[^"]+)"[^>]+><strong>DOWNLOAD &amp; STREAMING</strong>', url=item.url)[0]
match = support.match(item, patron=r'href="(?P<url>[^"]+)"[^>]+><strong>DOWNLOAD &amp; STREAMING</strong>').match
if match:
patronBlock = r'<h6>Episodio</h6>(?P<block>.*?)(?:<!--|</table>)'
patron = r'<a href="http://link\.animetubeita\.com/2361078/(?P<url>[^"]+)"'
match = support.match(item, patron, patronBlock, headers, match[0])[0]
match = support.match(match, patron=patron, patronBlock=patronBlock, headers=headers).match
else: return itemlist
if match: item.url = match[-1]
+11
View File
@@ -0,0 +1,11 @@
{
"id": "animeunity",
"name": "AnimeUnity",
"active": true,
"adult": false,
"language": ["ita", "sub-ita"],
"thumbnail": "animeunity.png",
"banner": "animeunity.png",
"categories": ["anime"],
"settings": []
}
+123
View File
@@ -0,0 +1,123 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per AnimeUnity
# ------------------------------------------------------------
from core import support
host = support.config.get_channel_url()
list_servers = ['mixdrop', 'wstream', 'vupplayer', 'supervideo', 'cloudvideo', 'gounlimited']
list_quality = ['default','1080p', '720p', '480p', '360p']
headers = [['Referer', host]]
@support.menu
def mainlist(item):
anime = ['/anime.php?c=archive&page=*',
('In Corso',['/anime.php?c=onair', 'peliculas']),
('Ultimi Episodi', ['', 'peliculas', 'news']),
('Ultimi Aggiunti', ['', 'peliculas', 'last'])
]
return locals()
@support.scrape
def menu(item):
action = 'peliculas'
patronBlock = item.args + r' Categorie</a>\s*<ul(?P<block>.*?)</ul>'
patronMenu = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^>]+)<'
return locals()
def search(item, text):
support.log('search', item)
item.url = host + '/anime.php?c=archive&page=*'
item.search = text
try:
return peliculas(item)
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.log('search log:', line)
return []
def newest(categoria):
support.log(categoria)
itemlist = []
item = support.Item()
item.url = host
item.args = 'news'
item.action = 'peliculas'
try:
itemlist = peliculas(item)
if itemlist[-1].action == 'peliculas':
itemlist.pop()
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.log({0}.format(line))
return []
return itemlist
@support.scrape
def peliculas(item):
# debug = True
pagination = 20
anime = True
if item.args == 'news':
patron = r'col-lg-3 col-md-6 col-sm-6 col-xs-6 mobile-col">\s*<a href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img class="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^-]+)\D+Episodio\s*(?P<episode>\d+)'
patronNext = r'page-link" href="([^"]+)">'
elif item.args == 'last':
patronBlock = r'ULTIME AGGIUNTE[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<block>.*?)<div class="row"'
patron = r'<img class="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>\s*<a class="[^"]+" href="(?P<url>[^"]+)"\s*>(?P<title>[^<]+)</a>'
else:
search = item.search
patron = r'<div class="card-img-top archive-card-img"> <a href="(?P<url>[^"]+)"> <img class="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<\(]+)(?:\((?P<lang>[^\)]+)\))?'
return locals()
@support.scrape
def episodios(item):
# debug = True
data = item.data
anime = True
pagination = 50
patron = r'<a href="(?P<url>[^"]+)" class="\D+ep-button">(?P<episode>\d+)'
def itemHook(item):
item.title = item.title + support.typo(item.fulltitle,'-- bold')
return item
return locals()
def findvideos(item):
support.log()
html = support.match(item, patron=r'TIPO:\s*</b>\s*([A-Za-z]+)')
if html.match == 'TV' and item.contentType != 'episode':
item.contentType = 'tvshow'
item.data = html.data
return episodios(item)
else:
itemlist = []
if item.contentType != 'episode': item.contentType = 'movie'
video = support.match(html.data, patron=r'<source src="([^"]+)"').match
itemlist.append(
support.Item(
channel=item.channel,
action="play",
title='Diretto',
quality='',
url=video,
server='directo',
fulltitle=item.fulltitle,
show=item.show,
contentType=item.contentType,
folder=False))
return support.server(item, itemlist=itemlist)
+10 -8
View File
@@ -10,7 +10,7 @@ headers = [['Referer', host]]
__channel__ = 'animeworld'
list_servers = ['animeworld', 'verystream', 'streamango', 'openload', 'directo']
list_servers = ['directo', 'animeworld', 'vvvvid']
list_quality = ['default', '480p', '720p', '1080p']
@@ -34,7 +34,7 @@ def mainlist(item):
def genres(item):
support.log()
itemlist = []
matches = support.match(item, r'<input.*?name="([^"]+)" value="([^"]+)"\s*>[^>]+>([^<]+)<\/label>' , r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> Generi <span.[^>]+>(.*?)</ul>', headers=headers)[0]
matches = support.match(item, patron=r'<input.*?name="([^"]+)" value="([^"]+)"\s*>[^>]+>([^<]+)<\/label>' , patronBlock=r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> Generi <span.[^>]+>(.*?)</ul>', headers=headers).matches
for name, value, title in matches:
support.menuItem(itemlist, __channel__, support.typo(title, 'bold'), 'peliculas', host + '/filter?' + name + '=' + value + '&sort=' + order(), 'tvshow', args='sub')
return itemlist
@@ -44,7 +44,7 @@ def build_menu(item):
support.log()
itemlist = []
support.menuItem(itemlist, __channel__, 'Tutti bold', 'peliculas', item.url , 'tvshow' , args=item.args)
matches = support.match(item,r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (.*?) <span.[^>]+>(.*?)</ul>',r'<form class="filters.*?>(.*?)</form>', headers=headers)[0]
matches = support.match(item, patron=r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (.*?) <span.[^>]+>(.*?)</ul>', patronBlock=r'<form class="filters.*?>(.*?)</form>', headers=headers).matches
for title, html in matches:
if title not in 'Lingua Ordine':
support.menuItem(itemlist, __channel__, title + ' submenu bold', 'build_sub_menu', html, 'tvshow', args=item.args)
@@ -127,7 +127,7 @@ def peliculas(item):
def episodios(item):
anime=True
pagination = 50
data = support.match(item, headers=headers)[1]
data = support.match(item, headers=headers).data
if 'VVVVID' in data: patronBlock= r'<div class="server\s*active\s*"(?P<block>.*?)</ul>'
else: patronBlock= r'server active(?P<block>.*?)server hidden '
patron = r'<li><a [^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+" href="(?P<url>[^"]+)"[^>]+>(?P<episode>[^<]+)<'
@@ -143,9 +143,11 @@ def findvideos(item):
import time
support.log(item)
itemlist = []
matches, data = support.match(item, r'class="tab.*?data-name="([0-9]+)">', headers=headers)
matches = support.match(item, patron=r'class="tab.*?data-name="([0-9]+)">', headers=headers)
data = matches.data
matches = matches.matches
videoData = ''
for serverid in matches:
if not item.number: item.number = support.scrapertools.find_single_match(item.title, r'(\d+) -')
block = support.scrapertools.find_multiple_matches(data, 'data-id="' + serverid + '">(.*?)<div class="server')
@@ -153,7 +155,7 @@ def findvideos(item):
support.log('ID= ',serverid)
if id:
if serverid == '26':
matches = support.match(item, r'<a href="([^"]+)"', url='%s/ajax/episode/serverPlayer?id=%s' % (host, item.url.split('/')[-1]))[0]
matches = support.match('%s/ajax/episode/serverPlayer?id=%s' % (host, item.url.split('/')[-1]), patron=r'<a href="([^"]+)"', ).matches
for url in matches:
videoData += '\n' + url
else:
@@ -162,7 +164,7 @@ def findvideos(item):
json = jsontools.load(dataJson)
support.log(json)
if 'keepsetsu' in json['grabber']:
matches = support.match(item, r'<iframe\s*src="([^"]+)"', url=json['grabber'])[0]
matches = support.match(json['grabber'], patron=r'<iframe\s*src="([^"]+)"'),matches
for url in matches:
videoData += '\n' + url
else:
+88 -141
View File
@@ -2,34 +2,12 @@
# ------------------------------------------------------------
# Canale per 'casacinema'
# ------------------------------------------------------------
"""
Problemi noti che non superano il test del canale:
- Nella ricerca globale non sono presenti le voci:
- "Aggiungi in videoteca"
- "Scarica film/serie"
presenti però quando si entra nella pagina
Avvisi:
Novità:
- Film, SerieTv
Ulteriori info:
"""
import re
from core import support
from platformcode import config
# in caso di necessità
from core import scrapertools, httptools
from core.item import Item
##### fine import
host = config.get_channel_url()
host = support.config.get_channel_url()
headers = [['Referer', host]]
list_servers = ['verystream', 'openload', 'wstream', 'speedvideo']
@@ -37,9 +15,6 @@ list_quality = ['HD', 'SD']
@support.menu
def mainlist(item):
support.log(item)
## support.dbg()
film = ['/category/film',
('Generi', ['', 'genres', 'genres']),
('Sub-ITA', ['/category/sub-ita/', 'peliculas', 'sub'])
@@ -53,24 +28,90 @@ def mainlist(item):
return locals()
@support.scrape
def genres(item):
action = 'peliculas'
blacklist = ['PRIME VISIONI', 'ULTIME SERIE TV', 'ULTIMI FILM']
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></li>'
patronBlock = r'<div class="container home-cats">(?P<block>.*?)<div class="clear">'
return locals()
def select(item):
item.data = support.match(item).data
if 'continua con il video' in item.data.lower():
support.log('select = ### è un film ###')
item.contentType = 'movie'
return findvideos(item)
else:
support.log('select = ### è una serie ###')
item.contentType = 'tvshow'
return episodios(item)
def search(item, text):
support.log(text)
text = text.replace(' ', '+')
item.url = host + '/?s=' + text
item.args = 'search'
try:
item.contentType = '' # non fa uscire le voci nel context menu
return peliculas(item)
except:
import sys
for line in sys.exc_info():
support.log('search log:', line)
return []
def newest(categoria):
itemlist = []
item = support.Item()
item.args = 'newest'
try:
if categoria == 'series':
item.contentType = 'tvshow'
item.url = host+'/aggiornamenti-serie-tv'
else:
item.contentType = 'movie'
item.url = host+'/category/film'
item.action = 'peliculas'
itemlist = peliculas(item)
if itemlist[-1].action == 'peliculas':
itemlist.pop()
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.log('newest log: ', {0}.format(line))
return []
return itemlist
@support.scrape
def peliculas(item):
support.log(item)
## support.dbg() # decommentare per attivare web_pdb
if item.contentType == 'movie':
action = 'findvideos'
elif item.contentType == 'tvshow':
action = 'episodios'
pagination = ''
else:
# è una ricerca
action = 'select'
blacklist = ['']
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div> <div[^>]+>(?P<title>.*?)[ ]?(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<aside>'
patronNext = '<a href="([^"]+)" >Pagina'
if item.args == 'newest':
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div> <div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
else:
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div> <div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<'
patronNext = r'<a href="([^"]+)" >Pagina'
def itemHook(item):
if item.quality1:
@@ -82,125 +123,31 @@ def peliculas(item):
if item.args == 'novita':
item.title = item.title
return item
## debug = True # True per testare le regex sul sito
return locals()
@support.scrape
def episodios(item):
support.log(item)
#dbg
if item.data1:
data = item.data1
if item.data:
data = item.data
action = 'findvideos'
item.contentType = 'tvshow'
blacklist = ['']
patron = r'(?P<episode>\d+(?:&#215;|×)?\d+\-\d+|\d+(?:&#215;|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:<br />|</p>)'
patronBlock = r'<strong>(?P<block>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?(?:.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
## debug = True
return locals()
# Questa def è utilizzata per generare il menu 'Generi' del canale
# per genere, per anno, per lettera, per qualità ecc ecc
@support.scrape
def genres(item):
support.log(item)
#dbg
action = 'peliculas'
blacklist = ['PRIME VISIONI', 'ULTIME SERIE TV', 'ULTIMI FILM']
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></li>'
patronBlock = r'<div class="container home-cats">(?P<block>.*?)<div class="clear">'
#debug = True
return locals()
def select(item):
support.log('select --->', item)
## debug = True
#support.dbg()
data = httptools.downloadpage(item.url, headers=headers).data
data = re.sub('\n|\t', ' ', data)
data = re.sub(r'>\s+<', '> <', data)
if 'continua con il video' in data.lower():
## block = scrapertools.find_single_match(data, r'<div class="col-md-8 bg-white rounded-left p-5"><div>(.*?)<div style="margin-left: 0.5%; color: #FFF;">')
## if re.findall('rel="category tag">serie', data, re.IGNORECASE):
support.log('select = ### è un film ###')
return findvideos(Item(channel=item.channel,
title=item.title,
fulltitle=item.fulltitle,
url=item.url,
#args='serie',
contentType='movie',
data1 = data
))
else:
support.log('select = ### è una serie ###')
return episodios(Item(channel=item.channel,
title=item.title,
fulltitle=item.fulltitle,
url=item.url,
#args='serie',
contentType='tvshow',
data1 = data
))
############## Fondo Pagina
def search(item, text):
support.log('search ->', item)
itemlist = []
text = text.replace(' ', '+')
item.url = host + '/?s=' + text
item.args = 'search'
try:
item.contentType = 'episode' # non fa uscire le voci nel context menu
return peliculas(item)
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
except:
import sys
for line in sys.exc_info():
support.log('search log:', line)
return []
def newest(categoria):
support.log('newest ->', categoria)
itemlist = []
item = Item()
try:
if categoria == 'series':
item.contentType = 'tvshow'
item.url = host+'/aggiornamenti-serie-tv'
item.args = 'novita'
else:
item.contentType = 'movie'
item.url = host+'/category/film'
item.action = 'peliculas'
itemlist = peliculas(item)
if itemlist[-1].action == 'peliculas':
itemlist.pop()
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.log('newest log: ', {0}.format(line))
return []
return itemlist
def findvideos(item):
support.log('findvideos ->', item)
itemlist = []
if item.contentType != 'movie':
return support.server(item, item.url)
links = support.match(item.url, patron=r'href="([^"]+)"').matches
else:
links = str(support.match(item, r'SRC="([^"]+)"', patronBlock=r'<div class="col-md-10">(.+?)<div class="swappable" id="links">')[0])
if links:
links = links.replace('#', 'speedvideo.net')
return support.server(item, links)
else:
return support.server(item)
matchData = item.data if item.data else item
links = support.match(matchData, patron=r'(?:SRC|href)="([^"]+)"', patronBlock=r'<div class="col-md-10">(.+?)<div class="ads">').matches
data = ''
from lib.unshortenit import unshorten_only
for link in links:
support.log('URL=',link)
url, c = unshorten_only(link.replace('#', 'speedvideo.net'))
data += url + '\n'
return support.server(item, data)
+6 -6
View File
@@ -59,7 +59,7 @@ def peliculas(item):
blacklist = Blacklist
item.contentType = 'tvshow'
if item.args == 'newest':
data = support.match(item)[1]
# data = support.match(item).data
patron = r'<div id="blockvids"><ul><li><a href="(?P<url>[^"]+)"[^>]+><img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^\[]+)\[(?P<lang>[^\]]+)\]'
else:
patron = r'<div class="span4">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)"[^>]+><\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> <h1>(?P<title>[^<\[]+)(?:\[(?P<lang>[^\]]+)\])?</h1></a>.*?-->(?:.*?<br />)?\s*(?P<plot>[^<]+)'
@@ -68,7 +68,7 @@ def peliculas(item):
return locals()
def check(item):
item.url = support.match(item,r'(?:<p>|/>)(.*?)(?:<br|</td>|</p>)', r'Streaming:(.*?)</tr>')[0]
item.url = support.match(item, patron=r'(?:<p>|/>)(.*?)(?:<br|</td>|</p>)', patronBlock=r'Streaming:(.*?)</tr>').matches
if 'Episodio' in str(item.url):
item.contentType = 'tvshow'
return episodios(item)
@@ -87,14 +87,14 @@ def episodios(item):
sp = 0
for match in item.url:
if 'stagione' in match.lower():
find_season = support.match(match, r'Stagione\s*(\d+)')[0]
season = int(find_season[0]) if find_season else season + 1 if 'prima' not in match.lower() else season
find_season = support.match(match, patron=r'Stagione\s*(\d+)').match
season = int(find_season) if find_season else season + 1 if 'prima' not in match.lower() else season
else:
try: title = support.match(match,'<a[^>]+>([^<]+)</a>')[0][0]
try: title = support.match(match, patron=r'<a[^>]+>([^<]+)</a>').match
except: title = ''
if title:
if 'episodio' in title.lower():
ep = support.match(match, r'Episodio ((?:\d+.\d|\d+|\D+))')[0][0]
ep = support.match(match, patron=r'Episodio ((?:\d+.\d|\d+|\D+))').match
check = ep.isdigit()
if check or '.' in ep:
if '.' in ep:
+1 -1
View File
@@ -22,7 +22,7 @@ def findhost():
host = config.get_channel_url(findhost)
headers = [['Referer', host]]
list_servers = ['verystream', 'openload', 'streamango', 'wstream']
list_servers = ['mixdrop', 'akstream', 'wstream', 'backin']
list_quality = ['HD', 'SD', 'default']
checklinks = config.get_setting('checklinks', 'cineblog01')
+5 -1
View File
@@ -12,7 +12,11 @@ from platformcode import config
list_servers = ['akstream', 'wstream', 'backin', 'clipwatching', 'cloudvideo', 'verystream', 'onlystream', 'mixdrop']
list_quality = ['default']
host = config.get_channel_url()
def findhost():
permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
return 'https://www.' + permUrl['location'].replace('https://www.google.com/search?q=site:', '')
host = config.get_channel_url(findhost)
headers = [['Referer', host]]
@support.menu
+1 -1
View File
@@ -73,7 +73,7 @@ def findvideos(item):
support.log()
itemlist = []
matches = support.match(item, 'filename: "(.*?)"')[0]
matches = support.match(item, patron=r'filename: "(.*?)"').matches
for url in matches:
itemlist.append(
-1
View File
@@ -7,6 +7,5 @@
"thumbnail": "dreamsub.png",
"banner": "dreamsub.png",
"categories": ["anime", "vos"],
"not_active": ["include_in_newest"],
"settings": []
}
+89 -238
View File
@@ -2,214 +2,54 @@
# ------------------------------------------------------------
# Canale per 'dreamsub'
# ------------------------------------------------------------
# ------------------------------------------------------------
"""
Problemi noti che non superano il test del canale:
- Nessuno noto!
Avvisi per i tester:
1. Gli episodi sono divisi per pagine di 20
2. In Novità->Anime, cliccare sulla home il bottone "Ultime inserite"
Se avete più titoli in KOD, ridimensiona il browser in modo che si vedano i titoli
a gruppi di 3 e ricontrollare, è un problema del sito.
3.Passaggi per Aggiungere in videoteca e/o scaricare Serie:
1. sul titolo -> menu contestuale -> Rinumerazione
Solo dopo questo passaggio appariranno le voci, sul titolo -> menu contestuale ->:
- Aggiungi in videoteca (senza rinumerazione non appare
la voce)
- Scarica Serie e Scarica Stagione ( Se download Abilitato! )
4. ### PIù IMPORTANTE!!! ###
#### NON E' DA CONSIDERARE ERRORE NEL TEST QUANTO RIPORTATO DI SEGUITO!!!! ####
1. Il sito permette un filtro tra anime e film, tramite url.
Se nell'url c'è /anime/, sul titolo e proseguendo fino alla pagina del video, saranno
presenti le voci:
- 'Rinumerazione', prima, e dopo: 'Aggiungi in videoteca', 'Scarica Serie' etc...
Tutto il resto è trattato come film e si avranno le voci solite:
AD eccezione per quei "FILM" che hanno 2 o più titoli all'interno, in questo caso:
1. Non apparirà nessuna voce tra "Aggiungi in videoteca" e "Scarica Film" e nemmeno "rinumerazione"
2. Dopo essere entrato nella pagina del Titolo Principale, troverai una lista di titoli dove sarà possibile scaricare
il filmato (chiamato EPISODIO) stessa cosa accedendo alla pagina ultima del video
3. Questi TITOLI NON POSSONO ESSERE AGGIUNTI IN VIDEOTECA
le voci "Scarica FILM" si avranno dopo.
Es:
https://www.dreamsub.stream/movie/5-centimetri-al-secondo -> film ma ha 3 titoli
Il Canale NON è presente nelle novità(globale) -> Anime
"""
# Qui gli import
import re
from core import support
from platformcode import config
from core import scrapertools, httptools, servertools, tmdb
from core.item import Item
##### fine import
host = config.get_channel_url()
host = support.config.get_channel_url()
headers = [['Referer', host]]
# server di esempio...
list_servers = ['directo', 'verystream', 'streamango', 'openload']
# quality di esempio
list_quality = ['default']
#### Inizio delle def principali ###
@support.menu
def mainlist(item):
support.log(item)
anime = ['/anime',
## ('Novità', ['']),
## ('OAV', ['/search/oav', 'peliculas', 'oav']),
## ('OVA', ['/search/ova', 'peliculas', 'ova']),
('Movie', ['/search/movie', 'peliculas', '', 'movie']),
('Film', ['/search/film', 'peliculas', '', 'movie']),
('Categorie', ['/filter?genere=','genres']),
## ('Ultimi Episodi', ['', 'last'])
anime = ['/search?typeY=tv',
('Movie', ['/search?typeY=movie', 'peliculas', '', 'movie']),
('OAV', ['/search?typeY=oav', 'peliculas', '', 'tvshow']),
('Spinoff', ['/search?typeY=spinoff', 'peliculas', '', 'tvshow']),
('Generi', ['','menu','Generi']),
('Stato', ['','menu','Stato']),
('Ultimi Episodi', ['', 'peliculas', ['last', 'episodiRecenti']]),
('Ultimi Aggiornamenti', ['', 'peliculas', ['last', 'episodiNuovi']])
]
return locals()
@support.scrape
def peliculas(item):
support.log(item)
#dbg # decommentare per attivare web_pdb
anime = True
if item.args == 'newest':
patronBlock = r'<div class="showRoomGoLeft" sr="ultime"></div>(?P<block>.*?)<div class="showRoomGoRight" sr="ultime">'
else:
patronBlock = r'<input type="submit" value="Vai!" class="blueButton">(?P<block>.*?)<div class="footer">'
## patron = r'<div class="showStreaming"> <b>(?P<title>[^<]+).+?Stato streaming: '\
## '(?:[^<]+)<.*?Lingua:[ ](?P<lang1>ITA\/JAP|ITA|JAP)?(?:[ ])?'\
## '(?P<lang2>SUB ITA)?<br>.+?href="(?P<url>[^"]+)".+?'\
## 'background: url\((?P<thumb>[^"]+)\).+?<div class="tvTitle">.+?'\
## '<strong>Anno di inizio</strong>: (?P<year>\d+)<br>'
patron = r'<div class="showStreaming"> <b>(?P<title>[^<]+).+?Stato streaming: (?:[^<]+)<.*?Lingua:[ ](?P<lang1>ITA\/JAP|ITA|JAP)?(?:[ ])?(?P<lang2>SUB ITA)?<br>.+?href="(?P<url>[^"]+)".+?background: url\((?P<thumb>[^"]+)\).+?<div class="tvTitle">.+?Episodi[^>]+>.\s?(?P<nep>\d+).+?<strong>Anno di inizio</strong>: (?P<year>\d+)<br>'
patronNext = '<li class="currentPage">[^>]+><li[^<]+<a href="([^"]+)">'
def itemHook(item):
support.log("ITEMHOOK -> ", item)
item = language(item)
if 'anime' in item.url:
item.contentType = 'tvshow'
item.action = 'episodios'
#item.args = 'anime'
else:
if item.nep == '1':
item.contentType = 'movie'
item.action = 'findvideos'
else:
item.contentType = 'episode'
item.args = ''
item.nep = item.nep
item.action = 'findmovie'
return item
#debug = True
return locals()
@support.scrape
def episodios(item):
support.log(item)
#support.dbg()
action = 'findvideos'
patronBlock = r'<div class="seasonEp">(?P<block>.*?)<div class="footer">'
patron = r'<li><a href="(?P<url>[^"]+)"[^<]+<b>(?:.+?)[ ](?P<episode>\d+)<\/b>[^>]+>(?P<title>[^<]+)<\/i>[ ]\(?(?P<lang1>ITA|Sub ITA)?\s?.?\s?(?P<lang2>Sub ITA)?.+?\)?<\/a>'
def itemHook(item):
item = language(item)
return item
pagination = ''
#debug = True
return locals()
@support.scrape
def genres(item):
support.log(item)
#dbg
def menu(item):
item.contentType = ''
action = 'peliculas'
blacklist = ['tutti']
patron = r'<option value="(?P<title>[^"]+)">'
patronBlock = r'<select name="genere" id="genere" class="selectInput">(?P<block>.*?)</select>'
patronBlock = r'<div class="filter-header"><b>%s</b>(?P<block>.*?)<div class="filter-box">' % item.args
patronMenu = r'<a class="[^"]+" data-state="[^"]+" (?P<other>[^>]+)>[^>]+></i>[^>]+></i>[^>]+></i>(?P<title>[^>]+)</a>'
def itemHook(item):
item.contentTitle = item.contentTitle.replace(' ', '+')
item.url = host+'/filter?genere='+item.contentTitle
support.log(item.type)
for Type, ID in support.match(item.other, patron=r'data-type="([^"]+)" data-id="([^"]+)"').matches:
item.url = host + '/search?' + Type + 'Y=' + ID
return item
#debug = True
return locals()
@support.scrape
def findmovie(item):
support.log(item)
patronBlock = r'<div class="seasonEp">(?P<block>.*?)<div class="footer">'
item.contentType = 'episode'
item.nep = 2
patron = r'<li><a href="(?P<url>[^"]+)"[^>]+>.(?P<title2>.+?)-.+?-[ ]<b>(?P<title>.+?)</b>\s+\(?(?P<lang1>ITA)?\s?(?P<lang2>Sub ITA)?.+?\)?'
def itemHook(item):
item = language(item)
return item
#debug = True
return locals()
def language(item):
lang = []
if item.lang1:
if item.lang1.lower() == 'ita/jap' or item.lang1.lower() == 'ita':
lang.append('ITA')
if item.lang1.lower() == 'jap' and item.lang1.lower() == 'sub ita':
lang.append('Sub-ITA')
if item.lang2:
if item.lang2.lower() == 'sub ita':
lang.append('Sub-ITA')
item.contentLanguage = lang
if len(lang) ==2:
item.title += support.typo(lang[0], '_ [] color kod') + support.typo(lang[1], '_ [] color kod')
#item.show += support.typo(lang[0], '_ [] color kod') + support.typo(lang[1], '_ [] color kod')
elif len(lang) == 1:
item.title += support.typo(lang[0], '_ [] color kod')
#item.show += support.typo(lang[0], '_ [] color kod')
return item
def search(item, text):
support.log('search', item)
itemlist = []
support.log(text)
text = text.replace(' ', '+')
item.url = host + '/search/' + text
item.args = 'search'
try:
return peliculas(item)
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
@@ -217,77 +57,88 @@ def search(item, text):
return []
# da adattare... ( support.server ha vari parametri )
#support.server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True)
def newest(categoria):
support.log(categoria)
item = support.Item()
try:
if categoria == "anime":
item.url = host
item.args = ['last', 'episodiNuovi']
return peliculas(item)
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.logger.error("{0}".format(line))
return []
@support.scrape
def peliculas(item):
anime = True
if 'movie' in item.url:
item.contentType = 'movie'
action = 'findvideos'
else:
item.contentType = 'tvshow'
action = 'episodios'
if len(item.args) > 1 and item.args[0] == 'last':
patronBlock = r'<div id="%s"[^>]+>(?P<block>.*?)<div class="vistaDettagliata"' % item.args[1]
patron = r'<li>\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="thumb">[^>]+>[^>]+>[^>]+>\s*[EePp]+\s*(?P<episode>\d+)[^>]+>[^>]+>[^>]+>(?P<lang>[^<]*)<[^>]+>[^>]+>\s<img src="(?P<thumb>[^"]+)"'
else:
patron = r'<div class="showStreaming"> <b>(?P<title>[^<]+)[^>]+>[^>]+>\s*Stato streaming: (?:[^<]+)<[^>]+>[^>]+>\s*Lingua:[ ](?P<lang>ITA\/JAP|ITA|JAP|SUB ITA)?[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<div class="[^"]+" style="background: url\((?P<thumb>[^\)]+)\)'
patronNext = '<li class="currentPage">[^>]+><li[^<]+<a href="([^"]+)">'
return locals()
@support.scrape
def episodios(item):
anime = True
pagination = 100
if item.data:
data = item.data
patron = r'<div class="sli-name">\s*<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<'
return locals()
def findvideos(item):
support.log("ITEM ---->", item)
itemlist = []
support.log()
data = httptools.downloadpage(item.url).data
data = re.sub(r'\n|\t', ' ', data)
data = re.sub(r'>\s\s*<', '><', data)
patronBlock = r'LINK STREAMING(?P<block>.*?)LINK DOWNLOAD'
patron = r'href="(.+?)"'
block = scrapertools.find_single_match(data, patronBlock)
urls = scrapertools.find_multiple_matches(block, patron)
#support.regexDbg(item, patron, headers, data=data)
matches = support.match(item, patron=r'<a href="([^"]+)"', patronBlock=r'<div style="white-space: (.*?)<div id="main-content"')
for url in urls:
titles = item.infoLabels['title']
lang = ''
if 'sub_ita' in url.lower():
lang = 'Sub-ITA'
else:
lang = 'ITA'
if not matches.matches:
item.data = matches.data
item.contentType = 'tvshow'
return episodios(item)
if 'keepem.online' in data:
urls = scrapertools.find_multiple_matches(data, r'(https://keepem\.online/f/[^"]+)"')
for url in urls:
url = httptools.downloadpage(url).url
itemlist += servertools.find_video_items(data=url)
# matches.matches.sort()
elif 'keepsetsu' in url.lower() or 'woof' in url.lower():
if 'keepsetsu' in url.lower():
support.log("keepsetsu url -> ", url )
data = httptools.downloadpage(url).url
support.log("LINK-DATA :", data)
data = httptools.downloadpage(data).data
support.log("LINK-DATA2 :", data)
video_urls = scrapertools.find_single_match(data, r'<meta name="description" content="([^"]+)"')
else:
data = httptools.downloadpage(url).data
#host_video = scrapertools.find_single_match(data, r'var thisPageUrl = "(http[s]\:\/\/[^\/]+).+?"')
host_video = scrapertools.find_single_match(data, r'(?:let|var) thisPageUrl = "(http[s]\:\/\/[^\/]+).+?"')
link = scrapertools.find_single_match(data, r'<video src="([^"]+)"')
video_urls = host_video+link
title_show = support.typo(titles,'_ bold') + support.typo(lang,'_ [] color kod')
for url in matches.matches:
lang = url.split('/')[-2]
if 'ita' in lang.lower():
language = 'ITA'
if 'sub' in lang.lower():
language = 'Sub-' + language
quality = url.split('/')[-1]
itemlist.append(
support.Item(channel=item.channel,
action="play",
contentType=item.contentType,
title=title_show,
fulltitle=item.fulltitle,
show=item.fulltitle,
url=link if 'http' in link else video_urls,
infoLabels = item.infoLabels,
thumbnail=item.thumbnail,
contentSerieName= item.fulltitle,
contentTitle=title_show,
contentLanguage = 'ITA' if lang == [] else lang,
args=item.args,
title=language,
url=url,
contentLanguage = language,
quality = quality,
order = quality.replace('p','').zfill(4),
server='directo',
))
if item.contentType != 'episode' and int(item.nep) < 2 :
# Link Aggiungi alla Libreria
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findservers':
support.videolibrary(itemlist, item)
# link per scaricare
if config.get_setting('downloadenabled'):
support.download(itemlist, item)
return itemlist
itemlist.sort(key=lambda x: (x.title, x.order), reverse=False)
return support.server(item, itemlist=itemlist)
+4 -2
View File
@@ -145,7 +145,9 @@ def findvideos(item):
itemlist = []
patronBlock = '<div class="entry-content">(?P<block>.*)<footer class="entry-footer">'
patron = r'<a href="([^"]+)">'
matches, data = support.match(item, patron, patronBlock, headers)
html = support.match(item, patron=patron, patronBlock=patronBlock, headers=headers)
matches = html.matches
data= html.data
if item.args != 'episodios':
item.infoLabels['mediatype'] = 'episode'
@@ -156,7 +158,7 @@ def findvideos(item):
itemlist += support.server(item, data)
data = httptools.downloadpage(item.url).data
data = support.match(item.url).data
patron = r'>Posted in <a href="https?://fastsubita.com/serietv/([^/]+)/(?:[^"]+)?"'
series = scrapertools.find_single_match(data, patron)
titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
+7 -25
View File
@@ -2,19 +2,7 @@
# ------------------------------------------------------------
# Canale per filmpertutti.py
# ------------------------------------------------------------
"""
Questi sono commenti per i beta-tester.
Su questo canale, nella categoria 'Ricerca Globale'
non saranno presenti le voci 'Aggiungi alla Videoteca'
e 'Scarica Film'/'Scarica Serie', dunque,
la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE.
Novità (globale). Indicare in quale/i sezione/i è presente il canale:
- film, serie
- I titoli in questa sezione a gruppi di 20
"""
import re
from core import scrapertools, httptools, support
@@ -24,7 +12,7 @@ from platformcode import config
host = config.get_channel_url()
headers = [['Referer', host]]
list_servers = ['speedvideo', 'verystream', 'openload', 'streamango', 'wstream', 'akvideo']
list_servers = ['mixdrop', 'akvideo', 'wstream', 'onlystream', 'speedvideo']
list_quality = ['HD', 'SD']
@support.menu
@@ -74,16 +62,11 @@ def peliculas(item):
@support.scrape
def episodios(item):
data = httptools.downloadpage(item.url, headers=headers).data
data = re.sub('\n|\t', ' ', data)
data = re.sub(r'>\s+<', '> <', data)
support.log('SERIES DATA= ',data)
data = support.match(item.url, headers=headers).data
if 'accordion-item' in data:
patronBlock = r'<span class="season[^>]*>\d+[^>]+>[^>]+>[^>]+>[^>]+>\D*(?:STAGIONE|Stagione)[ -]+(?P<lang>[a-zA-Z\- ]+)[^<]*</span>(?P<block>.*?)<div id="(?:season|disqus)'
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<episode>[^<]+)<\/li>(?P<url>.*?javascript:;">)(?P<title>[^<]+)'
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<episode>[^<]+)<\/li>(?P<url>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
else:
# patronBlock = r'<div id="info" class="pad">(?P<block>.*?)<div id="disqus_thread">'
# deflang='Sub-ITA'
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?:&nbsp;|<strong>|<div class="addtoany)'
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<]+(?P<url>.*?)(?:<br|</p)'
def itemHook(item):
@@ -104,17 +87,16 @@ def genres(item):
action = 'peliculas'
patronBlock = r'<select class="cats">(?P<block>.*?)<\/select>'
patronMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>.*?)<\/option>'
patronMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>[^<]+)<\/option>'
return locals()
def select(item):
support.log()
data = httptools.downloadpage(item.url, headers=headers).data
patronBlock = scrapertools.find_single_match(data, r'class="taxonomy category" ><span property="name">(.*?)</span></a><meta property="position" content="2">')
if patronBlock.lower() != 'film':
patron=r'class="taxonomy category" ><span property="name">([^>]+)</span></a><meta property="position" content="2">'
block = support.match(item.url, patron=patron,headers=headers).match
if block.lower() != 'film':
support.log('select = ### è una serie ###')
item.contentType='tvshow'
return episodios(item)
+4 -2
View File
@@ -213,7 +213,9 @@ def findvideos(item):
log()
itemlist =[]
matches, data = support.match(item, '<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers)
html = support.match(item, patron='<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers)
matches = html.matches
data = html.data
for url in matches:
html = httptools.downloadpage(url, headers=headers).data
data += str(scrapertools.find_multiple_matches(html, '<meta name="og:url" content="([^"]+)">'))
@@ -224,7 +226,7 @@ def findvideos(item):
data = httptools.downloadpage(item.url).data
patron = r'<div class="item"><a href="'+host+'/serietv/([^"\/]+)\/"><i class="icon-bars">'
series = scrapertools.find_single_match(data, patron)
series = support.match(data, patron=patron).matches
titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
goseries = support.typo("Vai alla Serie:", ' bold')
itemlist.append(
+2 -2
View File
@@ -4,8 +4,8 @@
"active": true,
"adult": false,
"language": ["ita","sub-ita"],
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png",
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png",
"thumbnail": "italiaserie.png",
"bannermenu": "italiaserie.png",
"categories": ["tvshow", "vos"],
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime"],
"settings": []
+1 -1
View File
@@ -99,7 +99,7 @@ def findvideos(item):
if item.contentType == 'episode':
data = item.url
else:
data = support.match(item)[1]
data = support.match(item).data
if 'link-episode' in data:
item.data = data
return episodios(item)
+11
View File
@@ -0,0 +1,11 @@
{
"id": "pufimovies",
"name": "PufiMovies",
"active": true,
"adult": false,
"language": ["ita", "sub-ita"],
"thumbnail": "pufimovies.png",
"banner": "pufimovies.png",
"categories": ["movie","tvshow"],
"settings": []
}
+111
View File
@@ -0,0 +1,111 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per PufiMovies
# ------------------------------------------------------------
from core import support
host = support.config.get_channel_url()
list_servers = ['mixdrop', 'wstream', 'vupplayer', 'supervideo', 'cloudvideo', 'gounlimited']
list_quality = ['default','1080p', '720p', '480p', '360p']
headers = [['Referer', host]]
@support.menu
def mainlist(item):
film = [
('Generi', ['', 'menu', 'Film']),
('Più Visti', ['','peliculas', 'most'])
]
tvshow = ['',
('Generi', ['', 'menu', 'Serie Tv']),
('Ultimi Episodi', ['','peliculas', 'last'])
]
search = ''
return locals()
@support.scrape
def menu(item):
action = 'peliculas'
patronBlock = item.args + r' Categorie</a>\s*<ul(?P<block>.*?)</ul>'
patronMenu = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^>]+)<'
return locals()
def search(item, text):
support.log('search', item)
text = text.replace(' ', '+')
item.url = host + '/search/keyword/' + text
try:
item.args = 'search'
return peliculas(item)
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.log('search log:', line)
return []
def newest(categoria):
support.log(categoria)
itemlist = []
item = support.Item()
item.url = host
item.action = 'peliculas'
try:
if categoria == 'peliculas':
item.contentType = 'movie'
itemlist = peliculas(item)
else:
item.args = 'last'
item.contentType = 'tvshow'
itemlist = peliculas(item)
if itemlist[-1].action == 'peliculas':
itemlist.pop()
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
support.log({0}.format(line))
return []
return itemlist
@support.scrape
def peliculas(item):
if item.contentType == 'tvshow' and not item.args:
action = 'episodios'
patron = r'<div class="movie-box">\s*<a href="(?P<url>[^"]+)">[^>]+>[^>]+>\D+Streaming\s(?P<lang>[^"]+)[^>]+>[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>\s*(?P<year>\d+)'
elif item.contentType == 'movie' and not item.args:
patron = r'<div class="existing_item col-6 col-lg-3 col-sm-4 col-xl-4">\s*<div class="movie-box">\s*<a href="(?P<url>(?:http(?:s)://[^/]+)?/(?P<type>[^/]+)/[^"]+)">[^>]+>[^>]+>\D+Streaming\s*(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>\s*(?:(?P<year>\d+))?[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]*)<'
elif item.args == 'last':
patron = r'<div class="episode-box">[^>]+>[^>]+>[^>]+>\D+Streaming\s(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>[^^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>\D*(?P<season>\d+)[^>]+>\D*(?P<episode>\d+)'
elif item.args == 'most':
patron =r'div class="sm-113 item">\s*<a href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<title>[^<]+)'
else:
patron = r'<div class="movie-box">\s*<a href="(?P<url>(?:http(?:s)://[^/]+)?/(?P<type>[^/]+)/[^"]+)">[^>]+>[^>]+>\D+Streaming\s*(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>\s*(?:(?P<year>\d+))?[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]*)<'
typeActionDict = {'findvideos':['movie'], 'episodios':['tvshow']}
typeContentDict = {'movie':['movie'], 'tvshow':['tvshow']}
patronNext = r'<a href="([^"]+)"[^>]+>&raquo;'
return locals()
@support.scrape
def episodios(item):
patron = r'<div class="episode-box">[^>]+>[^>]+>[^>]+>\D+Streaming\s(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>\D*(?P<season>\d+)[^>]+>\D*(?P<episode>\d+)'
return locals()
def findvideos(item):
support.log()
# match = support.match(item, patron='wstream', debug=True)
return support.server(item)
+3 -3
View File
@@ -34,11 +34,11 @@ def peliculas(item):
@support.scrape
def episodios(item):
data =''
url = support.match(item, patronBlock=r'<iframe width=".+?" height=".+?" src="([^"]+)" allowfullscreen frameborder="0">')[1]
seasons = support.match(item, r'<a href="([^"]+)">(\d+)<', r'<h3>STAGIONE</h3><ul>(.*?)</ul>', headers, url)[0]
url = support.match(item, patron=r'<iframe width=".+?" height=".+?" src="([^"]+)" allowfullscreen frameborder="0">').match
seasons = support.match(url, patron=r'<a href="([^"]+)">(\d+)<', patronBlock=r'<h3>STAGIONE</h3><ul>(.*?)</ul>', headers=headers).matches
for season_url, season in seasons:
season_url = support.urlparse.urljoin(url, season_url)
episodes = support.match(item, r'<a href="([^"]+)">(\d+)<', '<h3>EPISODIO</h3><ul>(.*?)</ul>', headers, season_url)[0]
episodes = support.match(season_url, patron=r'<a href="([^"]+)">(\d+)<', patronBlock=r'<h3>EPISODIO</h3><ul>(.*?)</ul>', headers=headers).matches
for episode_url, episode in episodes:
episode_url = support.urlparse.urljoin(url, episode_url)
title = season + "x" + episode.zfill(2) + ' - ' + item.fulltitle
+9 -5
View File
@@ -108,7 +108,7 @@ def lista_serie(item):
else:
# Extrae las entradas
patron = r'<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
matches = support.match(item, patron, headers=headers)[0]
matches = support.match(item, patron=patron, headers=headers).matches
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
scrapedplot = ""
scrapedthumbnail = ""
@@ -148,7 +148,9 @@ def episodios(item, itemlist=[]):
patron += r'<p><a href="([^"]+)">'
matches, data = support.match(item, patron, headers=headers)
html = support.match(item, patron=patron, headers=headers)
matches = html.matches
data = html.data
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
scrapedplot = ""
@@ -224,7 +226,9 @@ def peliculas_tv(item):
patron = '<div class="post-meta">\s*<a href="([^"]+)"\s*title="([^"]+)"\s*class=".*?"></a>'
matches, data = support.match(item, patron, headers=headers)
html = support.match(item, patron=patron, headers=headers)
matches = html.matches
data = html.data
for scrapedurl, scrapedtitle in matches:
if scrapedtitle in ["FACEBOOK", "RAPIDGATOR", "WELCOME!"]:
@@ -298,7 +302,7 @@ def search(item, texto):
itemlist = []
patron = '<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
matches = support.match(item, patron, headers=headers)[0]
matches = support.match(item, patron=patron, headers=headers).matches
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
if texto.upper() in scrapedtitle.upper():
scrapedthumbnail = ""
@@ -333,7 +337,7 @@ def list_az(item):
alphabet = dict()
patron = '<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
matches = support.match(item, patron, headers=headers)[0]
matches = support.match(item, patron=patron, headers=headers).matches
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
letter = scrapedtitle[0].upper()
if letter not in alphabet:
+8 -4
View File
@@ -35,7 +35,6 @@ def mainlist(item):
def peliculas(item):
patronBlock = r'<div class="wrap">\s*<h.>.*?</h.>(?P<block>.*?)<footer>'
if item.args != 'update':
action = 'episodios'
patron = r'<div class="item">\s*<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<'
@@ -50,14 +49,15 @@ def peliculas(item):
@support.scrape
def episodios(item):
seasons, data = support.match(item, r'<option value="(\d+)"[^>]*>\D+(\d+)')
seasons = support.match(item, patron=r'<option value="(\d+)"[^>]*>\D+(\d+)').matches
patronBlock = r'</select><div style="clear:both"></div></h2>(?P<block>.*?)<div id="trailer" class="tab">'
patron = r'(?:<div class="list (?:active)?" data-id="(?P<season>\d+)">[^>]+>)?\s*<a data-id="(?P<episode>\d+)(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<url>[^>]+)>[^>]+>[^>]+>(?P<title>.+?)(?:\sSub-ITA)?<'
patron = r'(?:<div class="list (?:active)?")?\s*<a data-id="\d+(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<other>[^>]+)>.*?Episodio [0-9]+\s?(?:<br>(?P<title>[^<]+))?.*?Stagione (?P<season>[0-9]+) , Episodio - (?P<episode>[0-9]+).*?<(?P<url>.*?<iframe)'
def itemHook(item):
for value, season in seasons:
log(value)
log(season)
item.title = item.title.replace(value+'x',season+'x')
item.url += '\n' + item.other
return item
return locals()
@@ -110,7 +110,11 @@ def newest(categoria):
def findvideos(item):
log()
if item.args != 'update':
return support.server(item, data=item.url)
data = item.url
toUnshorten = scrapertools.find_multiple_matches(data, 'https?://buckler.link/[a-zA-Z0-9]+')
for link in toUnshorten:
data += '\n' + httptools.downloadpage(link, follow_redirects=False).headers["Location"]
return support.server(item, data=data)
else:
itemlist = []
item.infoLabels['mediatype'] = 'episode'
+3 -3
View File
@@ -149,15 +149,15 @@ def findvideos(item):
id = item.args['id']
season = str(item.args['season'])
episode = str(item.args['episode'])
res = support.match(item, 'src="([^"]+)"[^>]*></video>', url=url, headers=[['Referer', domain]])
res = support.match(url, patron='src="([^"]+)"[^>]*></video>', headers=[['Referer', domain]]).match
itemlist = []
if res[0]:
if res:
itemlist.append(
Item(channel=item.channel,
action="play",
title='contentful',
url=res[0][0],
url=res,
server='directo',
fulltitle=item.fulltitle,
thumbnail=item.thumbnail,
+4 -4
View File
@@ -124,7 +124,7 @@ def anime(item):
log()
itemlist = []
seasons = support.match(item, r'<div class="sp-body[^"]+">(.*?)<\/div>')[0]
seasons = support.match(item, patron=r'<div class="sp-body[^"]+">(.*?)<\/div>').matches
for season in seasons:
episodes = scrapertools.find_multiple_matches(season, r'<a.*?href="([^"]+)"[^>]+>([^<]+)<\/a>(.*?)<(:?br|\/p)')
for url, title, urls, none in episodes:
@@ -208,7 +208,7 @@ def newest(categoria):
item = Item()
item.url = host +'/aggiornamenti/'
matches = support.match(item, r'mediaWrapAlt recomended_videos"[^>]+>\s*<a href="([^"]+)" title="([^"]+)" rel="bookmark">\s*<img[^s]+src="([^"]+)"[^>]+>')[0]
matches = support.match(item, patron=r'mediaWrapAlt recomended_videos"[^>]+>\s*<a href="([^"]+)" title="([^"]+)" rel="bookmark">\s*<img[^s]+src="([^"]+)"[^>]+>').matches
for url, title, thumb in matches:
title = scrapertools.decodeHtmlentities(title).replace("Permalink to ", "").replace("streaming", "")
@@ -236,11 +236,11 @@ def findvideos(item):
## data = item.url
## else:
## data = httptools.downloadpage(item.url, headers=headers).data
data = httptools.downloadpage(item.url, headers=headers).data
data = support.match(item.url, headers=headers).data
data = re.sub('\n|\t', ' ', data)
data = re.sub(r'>\s+<', '> <', data)
check = scrapertools.find_single_match(data, r'<div class="category-film">\s+<h3>\s+(.*?)\s+</h3>\s+</div>')
check = support.match(data, patron=r'<div class="category-film">\s+<h3>\s+(.*?)\s+</h3>\s+</div>').match
if 'sub' in check.lower():
item.contentLanguage = 'Sub-ITA'
support.log("CHECK : ", check)
+1 -1
View File
@@ -104,7 +104,7 @@ def peliculas(item):
@support.scrape
def episodios(item):
anime = True
data = support.match(item, headers=headers)[1]
data = support.match(item, headers=headers).data
if 'https://vcrypt.net' in data:
patron = r'(?:<br /> |<p>)(?P<title>[^<]+)<a href="(?P<url>[^"]+)"'
else:
+3 -28
View File
@@ -4,33 +4,8 @@
"language": ["ita"],
"active": true,
"adult": false,
"thumbnail": "https://vedohd.pw/wp-content/uploads/2018/12/imgpsh_fullsize.png",
"banner": "https://vedohd.pw/wp-content/uploads/2018/12/imgpsh_fullsize.png",
"thumbnail": "vedohd.png",
"banner": "vedohd.png",
"categories": ["movie"],
"settings": [
{
"id": "include_in_global_search",
"type": "bool",
"label": "Includi in Ricerca Globale",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "include_in_newest_peliculas",
"type": "bool",
"label": "Includi in Novità - Film",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "include_in_newest_italiano",
"type": "bool",
"label": "Includi in Novità - Italiano",
"default": true,
"enabled": true,
"visible": true
}
]
"settings": []
}
+3 -3
View File
@@ -131,7 +131,7 @@ def peliculas(item):
elif '=' in item.args:
json_file = current_session.get(item.url + 'channels', headers=headers, params=payload).json()
Filter = support.match(item.args,r'\?([^=]+)=')[0][0]
Filter = support.match(item.args, patron=r'\?([^=]+)=').match
keys = [i[Filter] for i in json_file['data'] if Filter in i][0]
for key in keys:
if key not in ['1','2']:
@@ -162,7 +162,7 @@ def episodios(item):
for episode in episodes:
for key in episode:
if 'stagione' in key['title'].encode('utf8').lower():
match = support.match(key['title'].encode('utf8'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0]
match = support.match(key['title'].encode('utf8'), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
make_item = True
elif int(key['season_id']) == int(season_id):
@@ -206,7 +206,7 @@ def findvideos(item):
if 'youtube' in url: item.url = url
item.url = url.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
if 'https' not in item.url:
url = support.match(item, url='https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/playlist.m3u')[1]
url = support.match('https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/playlist.m3u')
url = url.split()[-1]
itemlist.append(
Item(action= 'play',