Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
[Dolphin]
|
||||||
|
Timestamp=2019,4,23,18,58,8
|
||||||
|
Version=4
|
||||||
|
|
||||||
|
[Settings]
|
||||||
|
HiddenFilesShown=true
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
*
|
|
||||||
!plugin.video.alfa
|
|
||||||
*.pyo
|
*.pyo
|
||||||
*.pyc
|
*.pyc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
# Alfa addon
|
# Kodi On Demand
|
||||||
### Es un proyecto sin ánimo de lucro y con fines educativos, basado en el código open source de pelisalacarta-ce, que permite utilizar Kodi u otra plataforma compatible como "navegador" para ver vídeos alojados en paginas web.
|
### Un fork italiano di [Alfa](https://github.com/alfa-addon)
|
||||||
|
Ognuno è libero (anzi, invitato!) a collaborare, per farlo è possibile utilizzare i pull request.
|
||||||
|
|
||||||
### Este addon es totalmente gratuito por lo tanto esta prohibida su venta en solitario o como parte de software integrado en cualquier dispositivo, es absolutamente para uso educativo y personal.
|
KOD come Alfa è sotto licenza GPL v3, pertanto, siete liberi di utilizzare parte del codice, a patto di rispettare i termini di suddetta licenza, che si possono riassumere in:
|
||||||
|
|
||||||
## Colaborar
|
- Il tuo addon deve essere rilasciando secondo la stessa licenza, ovvero essere open source (il fatto che lo zip sia visibile da chiunque non ha importanza, è necessario avere un repository git come questo)
|
||||||
Si deseas colaborar con el proyecto eres bienvenido a hacerlo, pero ten en cuenta por favor estas pautas
|
- Aggiungere i crediti a tutto ciò che copiate/modificate, ad esempio aggiungendo un commento nel file in questione o meglio facendo un cherry-pick (in modo da preservare lo storico)
|
||||||
|
|
||||||
- Para colaborar con sus Pull Request se pide seguir unas reglas de estilo basadas en las de python PEP8. Esto se puede
|
|
||||||
hacer desde diferentes IDEs que lo traen integrado como pydev, pycharm o ninjaIDE, o extensiones que se pueden
|
|
||||||
agregar a por ejemplo sublime, atom.
|
|
||||||
|
|
||||||
- Utilizar nombre de clases, métodos y variables en inglés para favorecer la comprensión de personas no hispano parlantes.
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<addon id="plugin.video.kod" name="Kodi on Demand" version="0.1.1" provider-name="KOD Team">
|
||||||
|
<requires>
|
||||||
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
|
<import addon="script.module.libtorrent" optional="true"/>
|
||||||
|
</requires>
|
||||||
|
<extension point="xbmc.python.pluginsource" library="default.py">
|
||||||
|
<provides>video</provides>
|
||||||
|
</extension>
|
||||||
|
<extension point="xbmc.addon.metadata">
|
||||||
|
<summary lang="en">Kodi on Demand is a Kodi add-on to search and watch contents on the web.</summary>
|
||||||
|
<summary lang="it">Kodi on Demand è un addon di Kodi per cercare e guardare contenuti sul web.</summary>
|
||||||
|
<assets>
|
||||||
|
<icon>logo.png</icon>
|
||||||
|
<fanart>fanart.jpg</fanart>
|
||||||
|
<screenshot>resources/media/themes/ss/1.png</screenshot>
|
||||||
|
<screenshot>resources/media/themes/ss/2.png</screenshot>
|
||||||
|
<screenshot>resources/media/themes/ss/3.png</screenshot>
|
||||||
|
</assets>
|
||||||
|
<news>Benvenuto su KOD!</news>
|
||||||
|
<description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description>
|
||||||
|
<disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR]
|
||||||
|
[COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer>
|
||||||
|
<platform>all</platform>
|
||||||
|
<license>GNU GPL v3</license>
|
||||||
|
<website>https://kodiondemand.github.io/</website>
|
||||||
|
<forum>https://t.me/kodiondemand</forum>
|
||||||
|
<source>https://github.com/kodiondemand/addon</source>
|
||||||
|
</extension>
|
||||||
|
<extension point="xbmc.service" library="videolibrary_service.py" start="login|startup">
|
||||||
|
</extension>
|
||||||
|
</addon>
|
||||||
@@ -114,7 +114,7 @@ def peliculas(item):
|
|||||||
fulltitle = scrapedtitle
|
fulltitle = scrapedtitle
|
||||||
if subDiv:
|
if subDiv:
|
||||||
fulltitle += support.typo(subText + ' _ () color limegreen')
|
fulltitle += support.typo(subText + ' _ () color limegreen')
|
||||||
fulltitle += support.typo(scrapedquality.strip()+ ' _ [] color blue')
|
fulltitle += support.typo(scrapedquality.strip()+ ' _ [] color kod')
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
@@ -158,6 +158,6 @@ def findvideos(item):
|
|||||||
# Requerido para AutoPlay
|
# Requerido para AutoPlay
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
support.videolibrary(itemlist, item, 'color blue')
|
support.videolibrary(itemlist, item, 'color kod')
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
+1
-1
@@ -104,6 +104,6 @@ def findvideos(item):
|
|||||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||||
|
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
support.videolibrary(itemlist, item ,'color blue bold')
|
support.videolibrary(itemlist, item ,'color kod bold')
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "altadefinizionehd",
|
"id": "altadefinizionehd",
|
||||||
"name": "AltadefinizioneHD",
|
"name": "AltadefinizioneHD",
|
||||||
"active": true,
|
"active": false,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["ita"],
|
"language": ["ita"],
|
||||||
"thumbnail": "https://altadefinizione.doctor/wp-content/uploads/2019/02/logo.png",
|
"thumbnail": "https://altadefinizione.doctor/wp-content/uploads/2019/02/logo.png",
|
||||||
@@ -30,12 +30,12 @@ def mainlist(item):
|
|||||||
|
|
||||||
itemlist =[]
|
itemlist =[]
|
||||||
|
|
||||||
support.menu(itemlist, '[B] > Anime ITA[/B]', 'build_menu', host+'/filter?language[]=1')
|
support.menu(itemlist, 'Anime ITA submenu bold', 'build_menu', host+'/filter?language[]=1')
|
||||||
support.menu(itemlist, '[B] > Anime SUB[/B]', 'build_menu', host+'/filter?language[]=0')
|
support.menu(itemlist, 'Anime SUB submenu bold', 'build_menu', host+'/filter?language[]=0')
|
||||||
support.menu(itemlist, ' > Anime A-Z', 'alfabetico', host+'/az-list')
|
support.menu(itemlist, 'Anime A-Z sub', 'alfabetico', host+'/az-list')
|
||||||
support.menu(itemlist, 'Anime - Ultimi Aggiunti', 'alfabetico', host+'/newest')
|
support.menu(itemlist, 'Anime - Ultimi Aggiunti', 'alfabetico', host+'/newest')
|
||||||
support.menu(itemlist, 'Anime - Ultimi Episodi', 'alfabetico', host+'/newest')
|
support.menu(itemlist, 'Anime - Ultimi Episodi', 'alfabetico', host+'/newest')
|
||||||
support.menu(itemlist, '[COLOR blue]Cerca...[/COLOR]', 'search')
|
support.menu(itemlist, 'Cerca...', 'search')
|
||||||
|
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
@@ -52,9 +52,7 @@ def build_menu(item):
|
|||||||
channel=item.channel,
|
channel=item.channel,
|
||||||
action="video",
|
action="video",
|
||||||
title="[B]Tutti[/B]",
|
title="[B]Tutti[/B]",
|
||||||
url=item.url,
|
url=item.url))
|
||||||
thumbnail=CategoriaThumbnail,
|
|
||||||
fanart=CategoriaFanart))
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r'\n|\t','',data)
|
data = re.sub(r'\n|\t','',data)
|
||||||
@@ -73,7 +71,9 @@ def build_menu(item):
|
|||||||
fulltitle=title,
|
fulltitle=title,
|
||||||
show=title,
|
show=title,
|
||||||
url=item.url,
|
url=item.url,
|
||||||
html=html))
|
html=html,
|
||||||
|
thumbnail=item.thumbnail,
|
||||||
|
fanart=item.fanart))
|
||||||
|
|
||||||
# Elimina FLingua dal Menu
|
# Elimina FLingua dal Menu
|
||||||
itemlist.pop(6)
|
itemlist.pop(6)
|
||||||
@@ -413,13 +413,3 @@ def findvideos(item):
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# riferimenti di servizio ====================================================
|
|
||||||
AnimeThumbnail = "http://img15.deviantart.net/f81c/i/2011/173/7/6/cursed_candies_anime_poster_by_careko-d3jnzg9.jpg"
|
|
||||||
AnimeFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg"
|
|
||||||
CategoriaThumbnail = "http://static.europosters.cz/image/750/poster/street-fighter-anime-i4817.jpg"
|
|
||||||
CategoriaFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg"
|
|
||||||
CercaThumbnail = "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"
|
|
||||||
CercaFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg"
|
|
||||||
AvantiTxt = config.get_localized_string(30992)
|
|
||||||
AvantiImg = "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"
|
|
||||||
@@ -59,7 +59,11 @@ def add_season(data=None):
|
|||||||
if season != "":
|
if season != "":
|
||||||
heading = config.get_localized_string(70687)
|
heading = config.get_localized_string(70687)
|
||||||
episode = platformtools.dialog_numeric(0, heading)
|
episode = platformtools.dialog_numeric(0, heading)
|
||||||
if episode != "":
|
if episode == "0":
|
||||||
|
heading = config.get_localized_string(70688)
|
||||||
|
special = platformtools.dialog_numeric(0, heading)
|
||||||
|
return [int(season), int(episode), int(special)]
|
||||||
|
elif episode != '':
|
||||||
return [int(season), int(episode)]
|
return [int(season), int(episode)]
|
||||||
|
|
||||||
|
|
||||||
@@ -90,14 +94,19 @@ def write_data(channel, show, data):
|
|||||||
|
|
||||||
def renumber(itemlist, item='', typography=''):
|
def renumber(itemlist, item='', typography=''):
|
||||||
log()
|
log()
|
||||||
|
# log(itemlist)
|
||||||
|
# key_list= item.title
|
||||||
|
# sorted_list = sorted(itemlist, key=key_list)
|
||||||
|
# log(sorted_list)
|
||||||
|
|
||||||
if item:
|
if item:
|
||||||
try:
|
try:
|
||||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||||
SERIES = dict_series[item.show]['season_episode']
|
SERIES = dict_series[item.show.rstrip()]['season_episode']
|
||||||
S = SERIES[0]
|
S = SERIES[0]
|
||||||
E = SERIES[1]
|
E = SERIES[1]
|
||||||
ID = SERIES[2]
|
SP = SERIES[2]
|
||||||
|
ID = SERIES[3]
|
||||||
|
|
||||||
page = 1
|
page = 1
|
||||||
epList = []
|
epList = []
|
||||||
@@ -110,16 +119,24 @@ def renumber(itemlist, item='', typography=''):
|
|||||||
if data:
|
if data:
|
||||||
for episodes in data['data']:
|
for episodes in data['data']:
|
||||||
if episodes['airedSeason'] >= S:
|
if episodes['airedSeason'] >= S:
|
||||||
|
if E == 0:
|
||||||
|
epList.append([0, SP])
|
||||||
|
E = 1
|
||||||
if episodes['airedEpisodeNumber'] >= E:
|
if episodes['airedEpisodeNumber'] >= E:
|
||||||
epList.append(str(episodes['airedSeason']) + 'x' + str(episodes['airedEpisodeNumber']))
|
epList.append([episodes['airedSeason'], episodes['airedEpisodeNumber']])
|
||||||
page = page + 1
|
page = page + 1
|
||||||
else:
|
else:
|
||||||
exist = False
|
exist = False
|
||||||
|
|
||||||
|
epList.sort()
|
||||||
ep = 0
|
ep = 0
|
||||||
|
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
item.title = typo(epList[ep] + ' - ', typography) + item.title
|
s = str(epList[ep][0])
|
||||||
|
e = str(epList[ep][1])
|
||||||
|
item.title = typo(s + 'x'+ e + ' - ', typography) + item.title
|
||||||
ep = ep + 1
|
ep = ep + 1
|
||||||
|
|
||||||
except:
|
except:
|
||||||
return itemlist
|
return itemlist
|
||||||
else:
|
else:
|
||||||
Executable → Regular
Executable → Regular
@@ -45,13 +45,13 @@ def mainlist(item):
|
|||||||
support.menu(itemlist, 'HD submenu', 'menu', host, args="Film HD Streaming")
|
support.menu(itemlist, 'HD submenu', 'menu', host, args="Film HD Streaming")
|
||||||
support.menu(itemlist, 'Per genere submenu', 'menu', host, args="Film per Genere")
|
support.menu(itemlist, 'Per genere submenu', 'menu', host, args="Film per Genere")
|
||||||
support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno")
|
support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno")
|
||||||
support.menu(itemlist, 'Cerca... submenu color blue', 'search', host, args='film')
|
support.menu(itemlist, 'Cerca film... submenu', 'search', host, args='film')
|
||||||
|
|
||||||
support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='episode')
|
support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='episode')
|
||||||
support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Lettera")
|
support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Lettera")
|
||||||
support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Genere")
|
support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Genere")
|
||||||
support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Anno")
|
support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Anno")
|
||||||
support.menu(itemlist, 'Cerca... submenu color blue', 'search', host + '/serietv/', contentType='episode', args='serie')
|
support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='episode', args='serie')
|
||||||
|
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ def findvideos(item):
|
|||||||
def load_links(itemlist, re_txt, color, desc_txt, quality=""):
|
def load_links(itemlist, re_txt, color, desc_txt, quality=""):
|
||||||
streaming = scrapertoolsV2.find_single_match(data, re_txt).replace('"', '')
|
streaming = scrapertoolsV2.find_single_match(data, re_txt).replace('"', '')
|
||||||
support.log('STREAMING=',streaming)
|
support.log('STREAMING=',streaming)
|
||||||
patron = '<td><a.*?href=(.*?) target[^>]+>([^<]+)<'
|
patron = '<td><a.*?href=(.*?) (?:target|rel)[^>]+>([^<]+)<'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(streaming)
|
matches = re.compile(patron, re.DOTALL).findall(streaming)
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
logger.debug("##### findvideos %s ## %s ## %s ##" % (desc_txt, scrapedurl, scrapedtitle))
|
logger.debug("##### findvideos %s ## %s ## %s ##" % (desc_txt, scrapedurl, scrapedtitle))
|
||||||
Executable → Regular
Executable → Regular
@@ -6,7 +6,7 @@ import base64
|
|||||||
import re
|
import re
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
from channels import autoplay
|
from channels import autoplay, support
|
||||||
from channels import filtertools
|
from channels import filtertools
|
||||||
from core import scrapertools, servertools, httptools
|
from core import scrapertools, servertools, httptools
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
@@ -18,14 +18,14 @@ from core import tmdb
|
|||||||
# Necessario per Autoplay
|
# Necessario per Autoplay
|
||||||
IDIOMAS = {'Italiano': 'IT'}
|
IDIOMAS = {'Italiano': 'IT'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
list_servers = ['wstream', 'openload', 'streamango', 'akstream', 'clipwatching', 'cloudvideo', 'youtube']
|
list_servers = ['akstream', 'wstream', 'openload', 'streamango']
|
||||||
list_quality = ['default']
|
list_quality = ['default']
|
||||||
|
|
||||||
# Necessario per Verifica Link
|
# Necessario per Verifica Link
|
||||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'cinemalibero')
|
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'cinemalibero')
|
||||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'cinemalibero')
|
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'cinemalibero')
|
||||||
|
|
||||||
host = 'https://www.cinemalibero.center'
|
host = 'https://www.cinemalibero.icu'
|
||||||
|
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
@@ -37,47 +37,20 @@ def mainlist(item):
|
|||||||
autoplay.init(item.channel, list_servers, list_quality) # Necessario per Autoplay
|
autoplay.init(item.channel, list_servers, list_quality) # Necessario per Autoplay
|
||||||
|
|
||||||
# Menu Principale
|
# Menu Principale
|
||||||
itemlist = [Item(channel=item.channel,
|
itemlist = []
|
||||||
action='video',
|
support.menu(itemlist, 'Film bold', 'video', host+'/category/film/')
|
||||||
title='Film',
|
support.menu(itemlist, 'Generi submenu', 'genres', host)
|
||||||
url=host+'/category/film/',
|
support.menu(itemlist, 'Cerca film submenu', 'search', host)
|
||||||
contentType='movie',
|
support.menu(itemlist, 'Serie TV bold', 'video', host+'/category/serie-tv/', contentType='episode')
|
||||||
thumbnail=''),
|
support.menu(itemlist, 'Anime submenu', 'video', host+'/category/anime-giapponesi/', contentType='episode')
|
||||||
Item(channel=item.channel,
|
support.menu(itemlist, 'Cerca serie submenu', 'search', host, contentType='episode')
|
||||||
action='sottomenu_film',
|
support.menu(itemlist, 'Sport bold', 'video', host+'/category/sport/')
|
||||||
title='Generi Film',
|
|
||||||
url=host,
|
|
||||||
contentType='movie',
|
|
||||||
thumbnail=''),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action='video',
|
|
||||||
title='Serie TV',
|
|
||||||
url=host+'/category/serie-tv/',
|
|
||||||
contentType='episode',
|
|
||||||
extra='tv',
|
|
||||||
thumbnail=''),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action='video',
|
|
||||||
title='Anime',
|
|
||||||
url=host+'/category/anime-giapponesi/',
|
|
||||||
contentType='episode',
|
|
||||||
thumbnail=''),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action='video',
|
|
||||||
title='Sport',
|
|
||||||
url=host+'/category/sport/',
|
|
||||||
contentType='movie',
|
|
||||||
thumbnail=''),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action='search',
|
|
||||||
title='[B]Cerca...[/B]',
|
|
||||||
thumbnail=''),
|
|
||||||
]
|
|
||||||
|
|
||||||
autoplay.show_option(item.channel, itemlist) # Necessario per Autoplay (Menu Configurazione)
|
autoplay.show_option(item.channel, itemlist) # Necessario per Autoplay (Menu Configurazione)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info("[cinemalibero.py] " + item.url + " search " + texto)
|
logger.info("[cinemalibero.py] " + item.url + " search " + texto)
|
||||||
item.url = host + "/?s=" + texto
|
item.url = host + "/?s=" + texto
|
||||||
@@ -91,13 +64,20 @@ def search(item, texto):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def genres(item):
|
||||||
|
return support.scrape(item, patron_block=r'<div id="bordobar" class="dropdown-menu(.*?)</li>', patron=r'<a class="dropdown-item" href="([^"]+)" title="([A-z]+)"', listGroups=['url', 'title'], action='video')
|
||||||
|
|
||||||
|
|
||||||
def video(item):
|
def video(item):
|
||||||
logger.info('[cinemalibero.py] video')
|
logger.info('[cinemalibero.py] video')
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
|
if host not in item.url:
|
||||||
|
item.url = host + item.url
|
||||||
|
|
||||||
# Carica la pagina
|
# Carica la pagina
|
||||||
data = httptools.downloadpage(item.url).data.replace('\n','').replace('\t','')
|
data = httptools.downloadpage(item.url).data.replace('\n','').replace('\t','')
|
||||||
block = scrapertools.find_single_match(data, '<div class="container">.*?class="col-md-12">(.*?)<div class=(?:"container"|"bg-dark ")>')
|
block = scrapertools.find_single_match(data, '<div class="container">.*?class="col-md-12[^"]*?">(.*?)<div class=(?:"container"|"bg-dark ")>')
|
||||||
|
|
||||||
# Estrae i contenuti
|
# Estrae i contenuti
|
||||||
matches = re.compile(r'<div class="col-lg-3">(.*?)<\/a><\/div>', re.DOTALL).findall(block)
|
matches = re.compile(r'<div class="col-lg-3">(.*?)<\/a><\/div>', re.DOTALL).findall(block)
|
||||||
@@ -143,7 +123,7 @@ def video(item):
|
|||||||
quality=quality,
|
quality=quality,
|
||||||
url=url,
|
url=url,
|
||||||
thumbnail=thumb,
|
thumbnail=thumb,
|
||||||
infoLabels=year,
|
infoLabels={'year': year},
|
||||||
show=title))
|
show=title))
|
||||||
|
|
||||||
# Next page
|
# Next page
|
||||||
@@ -202,6 +182,9 @@ def findvideos(item): # Questa def. deve sempre essere nominata findvideos
|
|||||||
logger.info('[cinemalibero.py] findvideos')
|
logger.info('[cinemalibero.py] findvideos')
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
|
if item.args == 'direct':
|
||||||
|
return servertools.find_video_items(item)
|
||||||
|
|
||||||
if item.contentType == 'episode':
|
if item.contentType == 'episode':
|
||||||
data = item.url.lower()
|
data = item.url.lower()
|
||||||
block = scrapertools.find_single_match(data,r'>streaming.*?<\/strong>*?<\/h2>(.*?)<\/div>')
|
block = scrapertools.find_single_match(data,r'>streaming.*?<\/strong>*?<\/h2>(.*?)<\/div>')
|
||||||
@@ -252,15 +235,14 @@ def findvideos(item): # Questa def. deve sempre essere nominata findvideos
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def episodios(item): # Questa def. deve sempre essere nominata episodios
|
def episodios(item): # Questa def. deve sempre essere nominata episodios
|
||||||
logger.info('[cinemalibero.py] episodios')
|
logger.info('[cinemalibero.py] episodios')
|
||||||
itemlist = []
|
itemlist = []
|
||||||
extra =''
|
extra = ''
|
||||||
|
|
||||||
# Carica la pagina
|
# Carica la pagina
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
block = scrapertools.find_single_match(data, r'<div class="col-md-8 bg-white rounded-left p-5"><div>(.*?)<\/div>')
|
block = scrapertools.find_single_match(data, r'<div class="col-md-8 bg-white rounded-left p-5"><div>(.*?)at-below-post')
|
||||||
if re.findall('rel="category tag">serie', data, re.IGNORECASE):
|
if re.findall('rel="category tag">serie', data, re.IGNORECASE):
|
||||||
# logger.info('select = ### è una serie ###')
|
# logger.info('select = ### è una serie ###')
|
||||||
extra='serie'
|
extra='serie'
|
||||||
@@ -269,9 +251,6 @@ def episodios(item): # Questa def. deve sempre essere nominata episodios
|
|||||||
# logger.info('select = ### è un anime ###')
|
# logger.info('select = ### è un anime ###')
|
||||||
extra='anime'
|
extra='anime'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
block = re.sub(r'<h2>.*?<\/h2>','',block)
|
block = re.sub(r'<h2>.*?<\/h2>','',block)
|
||||||
block = block.replace('<p>','').replace('<p style="text-align: left;">','').replace('–<','<').replace('-<','<').replace('–<','<').replace('– <','<').replace('<strong>','<stop><start><strong>')+'<stop>'
|
block = block.replace('<p>','').replace('<p style="text-align: left;">','').replace('–<','<').replace('-<','<').replace('–<','<').replace('– <','<').replace('<strong>','<stop><start><strong>')+'<stop>'
|
||||||
block = re.sub(r'stagione completa.*?<\/p>','',block,flags=re.IGNORECASE)
|
block = re.sub(r'stagione completa.*?<\/p>','',block,flags=re.IGNORECASE)
|
||||||
@@ -281,20 +260,34 @@ def episodios(item): # Questa def. deve sempre essere nominata episodios
|
|||||||
block = block.replace('<br /> <a','<a')
|
block = block.replace('<br /> <a','<a')
|
||||||
matches = re.compile(r'<start>.*?(?:stagione|Stagione)(.*?)<\/(?:strong|span)><\/p>(.*?)<stop>', re.DOTALL).findall(block)
|
matches = re.compile(r'<start>.*?(?:stagione|Stagione)(.*?)<\/(?:strong|span)><\/p>(.*?)<stop>', re.DOTALL).findall(block)
|
||||||
|
|
||||||
for lang, html in matches:
|
if not matches:
|
||||||
lang = re.sub('<.*?>','',lang)
|
matches = scrapertools.find_multiple_matches(block, r'<a href="([^"]+)"[^>]+>(Episodio [0-9]+)</a>')
|
||||||
html = html.replace('<br />','\n').replace('</p>','\n')
|
for scrapedurl, scrapedtitle in matches:
|
||||||
|
scrapedtitle = re.sub(r'Episodio ([0-9]+)', r'Episodio 1x\1', scrapedtitle)
|
||||||
matches = re.compile(r'([^<]+)([^\n]+)\n', re.DOTALL).findall(html)
|
|
||||||
for scrapedtitle, html in matches:
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="findvideos",
|
action="findvideos",
|
||||||
contentType='episode',
|
contentType='episode',
|
||||||
title=scrapedtitle + ' - (' + lang + ')',
|
title=scrapedtitle,
|
||||||
fulltitle=scrapedtitle,
|
fulltitle=scrapedtitle,
|
||||||
show=scrapedtitle,
|
show=item.fulltitle,
|
||||||
url=html))
|
url=scrapedurl,
|
||||||
|
args='direct'))
|
||||||
|
else:
|
||||||
|
for lang, html in matches:
|
||||||
|
lang = re.sub('<.*?>','',lang)
|
||||||
|
html = html.replace('<br />','\n').replace('</p>', '\n')
|
||||||
|
|
||||||
|
matches = re.compile(r'([^<]+)([^\n]+)\n', re.DOTALL).findall(html)
|
||||||
|
for scrapedtitle, html in matches:
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel,
|
||||||
|
action="findvideos",
|
||||||
|
contentType='episode',
|
||||||
|
title=scrapedtitle + ' - (' + lang + ')',
|
||||||
|
fulltitle=scrapedtitle,
|
||||||
|
show=item.fulltitle,
|
||||||
|
url=html))
|
||||||
|
|
||||||
elif extra == 'anime':
|
elif extra == 'anime':
|
||||||
block = re.sub(r'<start.*?(?:download:|Download:).*?<stop>','',block)
|
block = re.sub(r'<start.*?(?:download:|Download:).*?<stop>','',block)
|
||||||
@@ -310,7 +303,7 @@ def episodios(item): # Questa def. deve sempre essere nominata episodios
|
|||||||
contentType='episode',
|
contentType='episode',
|
||||||
title=scrapedtitle,
|
title=scrapedtitle,
|
||||||
fulltitle=scrapedtitle,
|
fulltitle=scrapedtitle,
|
||||||
show=scrapedtitle,
|
show=item.fulltitle,
|
||||||
url=html))
|
url=html))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user