Fix Piratestreaming
This commit is contained in:
@@ -4,58 +4,8 @@
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/piratestreaming.png",
|
||||
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/piratestreaming.png",
|
||||
"thumbnail": "piratestreaming.png",
|
||||
"bannermenu": "piratestreaming.png",
|
||||
"categories": ["anime","movie","tvshow"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi 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_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"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": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["No filtrar","IT"]
|
||||
}
|
||||
]
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -43,6 +43,33 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.url = host + '/category/films'
|
||||
item.contentType = 'movies'
|
||||
return peliculas(item)
|
||||
if categoria == "series":
|
||||
item.url = host + '/category/serie'
|
||||
item.contentType = 'tvshow'
|
||||
return peliculas(item)
|
||||
if categoria == "anime":
|
||||
item.url = host + '/category/anime-cartoni-animati'
|
||||
item.contentType = 'tvshow'
|
||||
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 []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
patron = r'data-placement="bottom" title="(?P<title>[^"]+)" alt=[^=]+="(?P<url>[^"]+)"> <img class="[^"]+" title="[^"]+" alt="[^"]+" src="(?P<thumb>[^"]+)"'
|
||||
@@ -58,12 +85,13 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
if item.data:
|
||||
data = item.data
|
||||
title = item.title
|
||||
patron = r'link-episode">\s*(?P<title>\d+.\d+)[^>]+<\/span>\s*(?P<url>.*?)</div>'
|
||||
if item.data: data = item.data
|
||||
# debug= True
|
||||
title = item.fulltitle
|
||||
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:[^\(]+\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>.*?) )[^>]+<\/span>\s*(?P<url>.*?)</div>'
|
||||
def itemHook(item):
|
||||
item.title += support.typo(' - ', 'bold') + title
|
||||
if 'Episodio' in item.title:
|
||||
item.title = support.re.sub(r'Episodio [0-9.-]+', title, item.title)
|
||||
return item
|
||||
return locals()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user