Aggiunto Metal Video
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"id": "metalvideo",
|
||||||
|
"name": "Metal Video",
|
||||||
|
"active": true,
|
||||||
|
"adult": false,
|
||||||
|
"language": ["all"],
|
||||||
|
"thumbnail": "metalvideo.png",
|
||||||
|
"banner": "metalvideo.png",
|
||||||
|
"categories": ["music"],
|
||||||
|
"settings" :[]
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Canale per altadefinizione01
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
from core import support
|
||||||
|
from core.item import Item
|
||||||
|
from platformcode import config
|
||||||
|
from xml.dom import minidom
|
||||||
|
|
||||||
|
#impostati dinamicamente da findhost()
|
||||||
|
|
||||||
|
|
||||||
|
host = 'https://metalvideo.com'
|
||||||
|
headers={'X-Requested-With': 'XMLHttpRequest'}
|
||||||
|
|
||||||
|
list_servers = ['youtube']
|
||||||
|
list_quality = ['default']
|
||||||
|
|
||||||
|
@support.scrape
|
||||||
|
def mainlist(item):
|
||||||
|
item.url = host
|
||||||
|
action = 'peliculas'
|
||||||
|
patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul> </div'
|
||||||
|
patron = r'<a href="(?P<url>[^"]+)"(?: class="")?>(?P<title>[^<]+)<'
|
||||||
|
def itemHook(item):
|
||||||
|
item.thumbnail = support.thumb(thumb='channels_music.png')
|
||||||
|
return item
|
||||||
|
def itemlistHook(itemlist):
|
||||||
|
itemlist.pop(0)
|
||||||
|
itemlist.append(
|
||||||
|
support.Item(
|
||||||
|
channel=item.channel,
|
||||||
|
title=support.typo('Cerca...', 'bold color kod'),
|
||||||
|
url = item.url,
|
||||||
|
action='search',
|
||||||
|
thumbnail=support.thumb(thumb='search.png')))
|
||||||
|
return itemlist
|
||||||
|
return locals()
|
||||||
|
|
||||||
|
@support.scrape
|
||||||
|
def peliculas(item):
|
||||||
|
action = 'findvideos'
|
||||||
|
patron= r'<img src="[^"]+" alt="(?P<title>[^"]+)" data-echo="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)"'
|
||||||
|
patronNext = r'<a href="([^"]+)">»'
|
||||||
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
return support.server(item, video_library=False)
|
||||||
|
|
||||||
|
|
||||||
|
def search(item, text):
|
||||||
|
support.log(text)
|
||||||
|
url = host + '/search.php?keywords=' + text + '&video-id='
|
||||||
|
try:
|
||||||
|
return peliculas(item)
|
||||||
|
# Continua la ricerca in caso di errore
|
||||||
|
except:
|
||||||
|
import sys
|
||||||
|
for line in sys.exc_info():
|
||||||
|
support.logger.error("%s" % line)
|
||||||
|
return []
|
||||||
+4
-4
@@ -1029,7 +1029,7 @@ def pagination(itemlist, item, page, perpage, function_level=1):
|
|||||||
thumbnail=thumb()))
|
thumbnail=thumb()))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, down_load=True, patronTag=None):
|
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, down_load=True, patronTag=None, video_library=True):
|
||||||
|
|
||||||
if not data and not itemlist:
|
if not data and not itemlist:
|
||||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
||||||
@@ -1069,9 +1069,9 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
|||||||
|
|
||||||
if patronTag:
|
if patronTag:
|
||||||
addQualityTag(item, verifiedItemlist, data, patronTag)
|
addQualityTag(item, verifiedItemlist, data, patronTag)
|
||||||
return controls(verifiedItemlist, item, AutoPlay, CheckLinks, down_load)
|
return controls(verifiedItemlist, item, AutoPlay, CheckLinks, down_load, video_library)
|
||||||
|
|
||||||
def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True, video_library=True):
|
||||||
from core import jsontools
|
from core import jsontools
|
||||||
from platformcode.config import get_setting
|
from platformcode.config import get_setting
|
||||||
|
|
||||||
@@ -1100,7 +1100,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
if AutoPlay == True and not 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1]:
|
if AutoPlay == True and not 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1]:
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
if item.contentChannel != 'videolibrary' and video_library: videolibrary(itemlist, item, function_level=3)
|
||||||
if get_setting('downloadenabled') and down_load == True: download(itemlist, item, function_level=3)
|
if get_setting('downloadenabled') and down_load == True: download(itemlist, item, function_level=3)
|
||||||
|
|
||||||
VL = False
|
VL = False
|
||||||
|
|||||||
Reference in New Issue
Block a user