Merge branch 'stable' of https://github.com/kodiondemand/addon into stable
This commit is contained in:
+61
-30
@@ -41,13 +41,14 @@ def mainlist(item):
|
||||
('HD', ['', 'menu', 'Film HD Streaming']),
|
||||
('Generi', ['', 'menu', 'Film per Genere']),
|
||||
('Anni', ['', 'menu', 'Film per Anno']),
|
||||
('Ultimi aggiunti', ['/lista-film-ultimi-100-film-aggiunti/', 'newest'])
|
||||
('Ultimi Aggiornati',['/lista-film-ultimi-100-film-aggiornati/', 'peliculas', 'newest']),
|
||||
('Ultimi Aggiunti', ['/lista-film-ultimi-100-film-aggiunti/', 'peliculas', 'newest'])
|
||||
]
|
||||
tvshow = ['/serietv/',
|
||||
('Per Lettera', ['/serietv/', 'menu', 'Serie-Tv per Lettera']),
|
||||
('Per Genere', ['/serietv/', 'menu', 'Serie-Tv per Genere']),
|
||||
('Per anno', ['/serietv/', 'menu', 'Serie-Tv per Anno']),
|
||||
('Aggiornamento quotidiano', ['/serietv/aggiornamento-quotidiano-serie-tv/', 'newest'])
|
||||
('Ultime Aggiornate', ['/serietv/', 'peliculas', 'newest'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
@@ -63,34 +64,55 @@ def menu(item):
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
# @support.scrape
|
||||
# def newest(categoria):
|
||||
# findhost()
|
||||
# # debug = True
|
||||
# patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||
|
||||
# if type(categoria) != Item:
|
||||
# item = Item()
|
||||
# else:
|
||||
# item = categoria
|
||||
# categoria = 'series' if item.contentType != 'movie' else 'movie'
|
||||
# pagination = 20
|
||||
|
||||
# if categoria == 'series':
|
||||
# item.contentType = 'tvshow'
|
||||
# action = 'episodios'
|
||||
# item.url = host + 'serietv/aggiornamento-quotidiano-serie-tv/'
|
||||
# patronBlock = r'<article class="sequex-post-content">(?P<block>.*?)</article>'
|
||||
# patron = '<a href="(?P<url>[^"]+)".*?>(?P<title>[^<([|]+).*?(?P<lang>ITA|SUB-ITA)?</a'
|
||||
# else:
|
||||
# item.contentType = 'movie'
|
||||
# item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||
# patronBlock = r'Ultimi 100 film aggiunti:(?P<block>.*?)<\/td>'
|
||||
# # else:
|
||||
# # patronBlock = r'Ultimi 100 film Aggiornati:(?P<block>.*?)<\/td>'
|
||||
# # item = categoria
|
||||
|
||||
# return locals()
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
# debug = True
|
||||
patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||
|
||||
if type(categoria) != Item:
|
||||
item = Item()
|
||||
else:
|
||||
item = categoria
|
||||
categoria = 'series' if item.contentType != 'movie' else 'movie'
|
||||
pagination = 20
|
||||
|
||||
if categoria == 'series':
|
||||
item.contentType = 'tvshow'
|
||||
action = 'episodios'
|
||||
item.url = host + 'serietv/aggiornamento-quotidiano-serie-tv/'
|
||||
patronBlock = r'<article class="sequex-post-content">(?P<block>.*?)</article>'
|
||||
patron = '<a href="(?P<url>[^"]+)".*?>(?P<title>[^<([|]+).*?(?P<lang>ITA|SUB-ITA)?</a'
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||
patronBlock = r'Ultimi 100 film aggiunti:(?P<block>.*?)<\/td>'
|
||||
# else:
|
||||
# patronBlock = r'Ultimi 100 film Aggiornati:(?P<block>.*?)<\/td>'
|
||||
# item = categoria
|
||||
|
||||
return locals()
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "series":
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/serietv/' # aggiornamento-quotidiano-serie-tv/'
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||
item.args = "newest"
|
||||
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 []
|
||||
|
||||
|
||||
def search(item, text):
|
||||
@@ -115,7 +137,16 @@ def peliculas(item):
|
||||
'Aggiornamento Quotidiano Serie TV', 'OSCAR 2019 ▶ CB01.UNO: Vota il tuo film preferito! 🎬',
|
||||
'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?']
|
||||
|
||||
if '/serietv/' not in item.url:
|
||||
if 'newest' in item.args:
|
||||
if '/serietv/' not in item.url:
|
||||
pagination = ''
|
||||
patronBlock = r'Ultimi 100 film [^:]+:(?P<block>.*?)<\/td>'
|
||||
patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||
action = 'findvideos'
|
||||
else:
|
||||
patronBlock = r'Ultime SerieTv aggiornate(?P<block>.*?)Lista'
|
||||
patron = r'src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: – \d+×\d+)?(?:"| – )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>[^>]+>[^>]+><a href="(?P<url>[^"]+)".*?<div class="rpwe-summary">.*?\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<'
|
||||
elif '/serietv/' not in item.url:
|
||||
patron = r'<div class="?card-image"?>.*?<img src="?(?P<thumb>[^" ]+)"? alt.*?<a href="?(?P<url>[^" >]+)(?:\/|")>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?.*?<strong>(?P<genre>[^<>&–]+).*?DURATA (?P<duration>[0-9]+).*?<br(?: /)?>(?P<plot>[^<>]+)'
|
||||
action = 'findvideos'
|
||||
else:
|
||||
@@ -125,7 +156,7 @@ def peliculas(item):
|
||||
|
||||
# patronBlock=[r'<div class="?sequex-page-left"?>(?P<block>.*?)<aside class="?sequex-page-right"?>',
|
||||
# '<div class="?card-image"?>.*?(?=<div class="?card-image"?>|<div class="?rating"?>)']
|
||||
patronNext='<a class="?page-link"? href="?([^>]+)"?><i class="fa fa-angle-right">'
|
||||
if 'newest' not in item.args: patronNext='<a class="?page-link"? href="?([^>]+)"?><i class="fa fa-angle-right">'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -300,7 +300,6 @@ def search(item, texto):
|
||||
|
||||
patron = '<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
|
||||
matches = support.match(item, patron, headers=headers)[0]
|
||||
support.regexDbg(item, patron, headers)
|
||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
||||
if texto.upper() in scrapedtitle.upper():
|
||||
scrapedthumbnail = ""
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://cloudvideo.tv/embed-([a-z0-9]+).html",
|
||||
"url": "https://cloudvideo.tv/embed-\\1.html"
|
||||
},
|
||||
{
|
||||
"pattern": "https://cloudvideo.tv/([a-z0-9]+)",
|
||||
"pattern": "cloudvideo.tv/(?:embed-)?([a-z0-9]+).html",
|
||||
"url": "https://cloudvideo.tv/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -19,8 +19,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
enc_data = scrapertools.find_single_match(data, "type='text/javascript'>(.*?)</script>")
|
||||
dec_data = jsunpack.unpack(enc_data)
|
||||
# enc_data = scrapertools.find_single_match(data, "type='text/javascript'>(.*?)</script>")
|
||||
# dec_data = jsunpack.unpack(enc_data)
|
||||
sources = scrapertools.find_single_match(data, "<source(.*?)</source")
|
||||
patron = 'src="([^"]+)'
|
||||
matches = scrapertools.find_multiple_matches(sources, patron)
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://gounlimited.to/(?:embed-|)([a-z0-9]+)(?:.html|)",
|
||||
"url": "https://gounlimited.to/embed-\\1.html"
|
||||
"pattern": "gounlimited.to/(?:embed-|)([a-z0-9]+)(?:.html|)",
|
||||
"url": "https://gounlimited.to/\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "gounlimited",
|
||||
"name": "gounlimited",
|
||||
"name": "Go Unlimited",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
@@ -38,5 +38,5 @@
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s31.postimg.cc/bsiaj2q2j/goo.png"
|
||||
"thumbnail": "server_gounlimited.png"
|
||||
}
|
||||
+5
-3
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertoolsV2
|
||||
from platformcode import config, logger
|
||||
@@ -22,9 +22,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
|
||||
# streaming url
|
||||
data = httptools.downloadpage(page_url).data
|
||||
jsCode = scrapertoolsV2.find_single_match(data, '<script>\r\nMDCore\.ref = "[a-z0-9]+";\r\n(.*?)\r\n</script>')
|
||||
data = re.sub(r'\n|\t|\r', ' ', data)
|
||||
data = re.sub(r'>\s\s*<', '><', data)
|
||||
jsCode = scrapertoolsV2.find_single_match(data, r'<script>\s*MDCore\.ref = "[a-z0-9]+"; (.*?) </script>')
|
||||
jsUnpacked = jsunpack.unpack(jsCode)
|
||||
url = "https://" + scrapertoolsV2.find_single_match(jsUnpacked, 'MDCore\.vsrc="//([^"]+)')
|
||||
url = "https://" + scrapertoolsV2.find_single_match(jsUnpacked, r'MDCore\.vsrc="//([^"]+)')
|
||||
|
||||
itemlist.append([".mp4 [MixDrop]", url])
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "vup.to/(?:embed-)?([a-z0-9]+).html",
|
||||
"url": "https://vup.to/\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "vupplayer",
|
||||
"name": "VUP Player",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_vupplayer.png"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools, scrapertools
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, config.get_localized_string(70449)
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
logger.info('VUP DATA= '+ data)
|
||||
patron = r'sources:\s*\[\{src:\s*"([^"]+)"'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url in matches:
|
||||
quality = 'm3u8'
|
||||
video_url = url
|
||||
if 'label' in url:
|
||||
url = url.split(',')
|
||||
video_url = url[0]
|
||||
quality = url[1].replace('label:','')
|
||||
video_urls.append(['VUP Player [%s]' % quality, video_url])
|
||||
return video_urls
|
||||
Reference in New Issue
Block a user