Merge branch 'master' of https://github.com/lozioangie/addon
This commit is contained in:
1
plugin.video.alfa/.dev
Normal file
1
plugin.video.alfa/.dev
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -144,7 +144,7 @@ def episodios(item):
|
||||
eptitle = re.sub(r"Episodio\s+\d+", "", scrapedtitle).strip()
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[B]" + fixedtitle + " " + eptitle + "[/B]",
|
||||
fulltitle=fixedtitle + " " + eptitle,
|
||||
|
||||
19
plugin.video.alfa/channels/streamingaltadefinizione.json
Normal file
19
plugin.video.alfa/channels/streamingaltadefinizione.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "streamingaltadefinizione",
|
||||
"name": "Streaming Altadefinizione",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "https://www.streamingaltadefinizione.world/wp-content/uploads/2018/09/StreamingAltadefinizioneLogo.png",
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in Ricerca Globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
68
plugin.video.alfa/channels/streamingaltadefinizione.py
Normal file
68
plugin.video.alfa/channels/streamingaltadefinizione.py
Normal file
@@ -0,0 +1,68 @@
|
||||
from channels import support, autoplay
|
||||
from core.item import Item
|
||||
|
||||
host = 'https://www.streamingaltadefinizione.world/'
|
||||
|
||||
list_servers = ['openload', 'wstream']
|
||||
list_quality = ['1080p', 'HD', 'DVDRIP', 'SD', 'CAM']
|
||||
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
support.menu(itemlist, 'Film', 'peliculas', host + "/film/")
|
||||
support.menu(itemlist, 'Film Anime', 'peliculas', host + "/genere/anime/")
|
||||
support.menu(itemlist, 'Film per genere', 'generos', host)
|
||||
support.menu(itemlist, 'Serie TV', 'peliculas', host + "/serietv/", contentType='tvshow')
|
||||
support.menu(itemlist, 'Anime', 'peliculas', host + "/genere/anime/", contentType='tvshow')
|
||||
support.menu(itemlist, 'Cerca film', 'search', host)
|
||||
support.menu(itemlist, 'Cerca serie tv', 'search', host, contentType='tvshow')
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log("[streamingaltadefinizione.py] " + item.url + " search " + text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
|
||||
return support.dooplay_search(item)
|
||||
|
||||
|
||||
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 peliculas(item):
|
||||
support.log("[streamingaltadefinizione.py] video")
|
||||
|
||||
return support.dooplay_films(item)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
return support.dooplay_get_episodes(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
server = link['server'][:link['server'].find(".")]
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="play",
|
||||
title=server + " [COLOR blue][" + link['title'] + "][/COLOR]",
|
||||
url=link['url'],
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=link['title'],
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
@@ -86,7 +86,7 @@ def color(text, color):
|
||||
|
||||
|
||||
def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="", patron_block="",
|
||||
patronNext="", action="findvideos", url_host=""):
|
||||
patronNext="", action="findvideos", url_host="", addVideolibrary = True):
|
||||
# patron: the patron to use for scraping page, all capturing group must match with listGroups
|
||||
# listGroups: a list containing the scraping info obtained by your patron, in order
|
||||
# accepted values are: url, title, thumb, quality, year, plot, duration, genre, rating
|
||||
@@ -199,7 +199,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
|
||||
if patronNext:
|
||||
nextPage(itemlist, item, data, patronNext, 2)
|
||||
|
||||
if item.infoLabels["title"] or item.fulltitle:
|
||||
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
item.fulltitle = item.infoLabels["title"]
|
||||
videolibrary(itemlist, item)
|
||||
|
||||
@@ -234,16 +234,60 @@ def dooplay_get_links(item, host):
|
||||
return ret
|
||||
|
||||
|
||||
def dooplay_get_episodes(item):
|
||||
itemlist = []
|
||||
item.contentType = "episode"
|
||||
data = httptools.downloadpage(item.url).data.replace("'", '"')
|
||||
patron = '<li class="mark-[0-9]">.*?<img.*?data-lazy-src="([^"]+).*?([0-9] - [0-9]).*?<a href="([^"]+)">([^<>]+).*?([0-9]{4})'
|
||||
|
||||
for scrapedthumb, scrapedep, scrapedurl, scrapedtitle, scrapedyear in scrapertoolsV2.find_multiple_matches(data, patron):
|
||||
scrapedep = scrapedep.replace(' - ', 'x')
|
||||
infoLabels = {}
|
||||
infoLabels['year'] = scrapedyear
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType="episode",
|
||||
title=scrapedep + " " + scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
show=item.fulltitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumb,
|
||||
infoLabels=infoLabels
|
||||
)
|
||||
)
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
videolibrary(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def dooplay_films(item, blacklist=""):
|
||||
patron = '<article id="post-[0-9]+" class="item movies">.*?<img src="(?!data)([^"]+)".*?<span class="quality">([^<>]+).*?<a href="([^"]+)">([^<>]+)</a></h3>.*?(?:<span>([0-9]{4})</span>|</article>).*?(?:<span>([0-9]+) min</span>|</article>).*?(?:<div class="texto">([^<>]+)|</article>).*?(?:genres">(.*?)</div>|</article>)'
|
||||
patronNext = '<a class="arrow_pag" href="([^"]+)"><i id="nextpagination"'
|
||||
return scrape(item, patron, ['thumb', 'quality', 'url', 'title', 'year', 'duration', 'plot', 'genre'], blacklist=blacklist, patronNext=patronNext)
|
||||
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
patron = '<article id="post-[0-9]+" class="item movies">.*?<img src="(?!data)([^"]+)".*?<span class="quality">([^<>]+).*?<a href="([^"]+)">([^<>]+)</a></h3>.*?(?:<span>([0-9]{4})</span>|</article>).*?(?:<span>([0-9]+) min</span>|</article>).*?(?:<div class="texto">([^<>]+)|</article>).*?(?:genres">(.*?)</div>|</article>)'
|
||||
else:
|
||||
action = 'episodios'
|
||||
patron = '<article id="post-[0-9]+" class="item tvshows">.*?<img src="(?!data)([^"]+)".*?(?:<span class="quality">([^<>]+))?.*?<a href="([^"]+)">([^<>]+)</a></h3>.*?(?:<span>([0-9]{4})</span>|</article>).*?(?:<span>([0-9]+) min</span>|</article>).*?(?:<div class="texto">([^<>]+)|</article>).*?(?:genres">(.*?)</div>|</article>)'
|
||||
# patronNext = '<a class="arrow_pag" href="([^"]+)"><i id="nextpagination"'
|
||||
patronNext = '<div class="pagination">.*?class="current".*?<a href="([^"]+)".*?<div class="resppages">'
|
||||
itemlist = scrape(item, patron, ['thumb', 'quality', 'url', 'title', 'year', 'duration', 'plot', 'genre'], blacklist=blacklist, patronNext=patronNext, action=action, addVideolibrary=False)
|
||||
if itemlist and 'Successivo' in itemlist[-1].title:
|
||||
itemlist[-1].action = 'peliculas'
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def dooplay_search(item, blacklist=""):
|
||||
patron = '<div class="result-item">.*?<img src="([^"]+)".*?<span class="movies">([^<>]+).*?<a href="([^"]+)">([^<>]+)</a>.*?<span class="year">([0-9]{4}).*?<div class="contenido"><p>([^<>]+)'
|
||||
if item.contentType == 'movie':
|
||||
type = 'movies'
|
||||
action = 'findvideos'
|
||||
else:
|
||||
type = 'tvshows'
|
||||
action = 'episodios'
|
||||
patron = '<div class="result-item">.*?<img src="([^"]+)".*?<span class="' + type + '">([^<>]+).*?<a href="([^"]+)">([^<>]+)</a>.*?<span class="year">([0-9]{4}).*?<div class="contenido"><p>([^<>]+)'
|
||||
patronNext = '<a class="arrow_pag" href="([^"]+)"><i id="nextpagination"'
|
||||
return scrape(item, patron, ['thumb', 'quality', 'url', 'title', 'year', 'plot'], blacklist=blacklist, patronNext=patronNext)
|
||||
return scrape(item, patron, ['thumb', 'quality', 'url', 'title', 'year', 'plot'], blacklist=blacklist, patronNext=patronNext, action=action)
|
||||
|
||||
|
||||
def swzz_get_url(item):
|
||||
|
||||
Reference in New Issue
Block a user