Fix altadefinizione (tranne sez. agg.), aggiunto wolfstream
This commit is contained in:
@@ -21,7 +21,7 @@ headers = [['Referer', host]]
|
|||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
|
||||||
film = ['/category/film/',
|
film = ['/category/film/',
|
||||||
('Al Cinema', ['/al-cinema/', 'peliculas']),
|
('Al Cinema', ['/prime-visioni/', 'peliculas']),
|
||||||
('Generi', ['', 'genres']),
|
('Generi', ['', 'genres']),
|
||||||
# ('Sub-ITA', ['/sub-ita/', 'peliculas'])
|
# ('Sub-ITA', ['/sub-ita/', 'peliculas'])
|
||||||
]
|
]
|
||||||
@@ -38,7 +38,9 @@ def mainlist(item):
|
|||||||
def genres(item):
|
def genres(item):
|
||||||
action = 'peliculas'
|
action = 'peliculas'
|
||||||
blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
|
blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
|
||||||
patronMenu = r'<option value="(?P<url>[^"]+)">(?P<title>[^<]+)'
|
patronMenu = r'<a href="(?P<url>[^"]+)" class="category-button">(?P<title>[^<]+)'
|
||||||
|
'<a href="https://altadefinizione.archi/category/film/animazione/" class="category-button">Animazione</a>'
|
||||||
|
|
||||||
def itemlistHook(itemlist):
|
def itemlistHook(itemlist):
|
||||||
itl = []
|
itl = []
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
@@ -72,7 +74,7 @@ def peliculas(item):
|
|||||||
# if item.args == 'search':
|
# if item.args == 'search':
|
||||||
# patron = r'<item>\s*<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
|
# patron = r'<item>\s*<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
|
||||||
patronNext = r'href="([^"]+)[^>]+>Successivo'
|
patronNext = r'href="([^"]+)[^>]+>Successivo'
|
||||||
# debug = True
|
debug = True
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -81,9 +83,9 @@ def episodios(item):
|
|||||||
item.quality = ''
|
item.quality = ''
|
||||||
data = item.data
|
data = item.data
|
||||||
action='findvideos'
|
action='findvideos'
|
||||||
# debug=True
|
# debugBlock=True
|
||||||
patronBlock = r'<span>\s*\w+\s*[Ss]tagione.*?(?P<lang>(?:[Ss][Uu][Bb][-]?)?[Ii][Tt][Aa])(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>'
|
patronBlock = r'<h2>[Ss]tagione: (?P<season>\d+)(?P<block>.*?)</ul>'
|
||||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)[^>]+>(?P<data>.*?)(?:</table)'
|
patron = r'<a href="(?P<url>[^"]+).*?[Ee]pisodio N°: (?P<episode>\d+)'
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -98,6 +100,7 @@ def check(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.debug()
|
logger.debug()
|
||||||
|
# support.dbg()
|
||||||
if item.contentType == 'movie' and isinstance(item.data, str):
|
if item.contentType == 'movie' and isinstance(item.data, str):
|
||||||
item.data = support.match(item.data, patron=r'data-id="([^"]+)').matches
|
item.data = support.match(support.match(item.data, patron=r'iframe src="([^"]+)').match).data
|
||||||
return support.server(item, item.data)
|
return support.server(item, item.data)
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"find_videos": {
|
||||||
|
"ignore_urls": [],
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "https?://wolfstream\\.tv/(?:embed-|e/)?([a-z0-9]+)",
|
||||||
|
"url": "https://wolfstream.tv/embed-\\1.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"free": true,
|
||||||
|
"id": "wolfstream",
|
||||||
|
"name": "WolfStream",
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"id": "black_list",
|
||||||
|
"label": "@70708",
|
||||||
|
"type": "bool",
|
||||||
|
"visible": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from core import httptools, scrapertools, support
|
||||||
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
logger.debug("(page_url='%s')" % page_url)
|
||||||
|
page = httptools.downloadpage(page_url)
|
||||||
|
global matches
|
||||||
|
data = page.data
|
||||||
|
|
||||||
|
matches = support.get_jwplayer_mediaurl(data, 'WolfStream')
|
||||||
|
if not matches:
|
||||||
|
data = scrapertools.find_single_match(data,
|
||||||
|
r"<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
||||||
|
if data:
|
||||||
|
from lib import jsunpack
|
||||||
|
data = jsunpack.unpack(data)
|
||||||
|
matches = support.get_jwplayer_mediaurl(data, 'WolfStream')
|
||||||
|
|
||||||
|
if not matches: # if not exists, the site just return a page with <video> but not url
|
||||||
|
return False, config.get_localized_string(70449) % "WolfStream"
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
|
logger.debug("url=" + page_url)
|
||||||
|
global matches
|
||||||
|
|
||||||
|
return matches
|
||||||
Reference in New Issue
Block a user