dooplay full scrape
This commit is contained in:
@@ -48,8 +48,9 @@
|
||||
"serietvonline": "https://serietvonline.tech",
|
||||
"serietvsubita": "http://serietvsubita.xyz",
|
||||
"serietvu": "https://www.serietvu.club",
|
||||
"streamingaltadefinizione": "https://www.streamingaltadefinizione.best",
|
||||
"streamingaltadefinizione": "https://www.streamingaltadefinizione.me",
|
||||
"streamtime": "https://t.me/s/StreamTime",
|
||||
"tantifilm": "https://www.tantifilm.eu",
|
||||
"toonitalia": "https://toonitalia.org"
|
||||
"toonitalia": "https://toonitalia.org",
|
||||
"vedohd": "https://vedohd.icu/"
|
||||
}
|
||||
|
||||
@@ -14,22 +14,16 @@ host = config.get_channel_url(__channel__)
|
||||
list_servers = ['verystream', 'openload', 'wstream']
|
||||
list_quality = ['1080p', 'HD', 'DVDRIP', 'SD', 'CAM']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
film = ["/film/"]
|
||||
anime = ["/genere/anime/",
|
||||
('Film Anime', ["/genere/anime/", 'peliculas']),
|
||||
('Film Anime per genere', ["/genere/anime/", 'generos'])
|
||||
]
|
||||
tvshow = ["/serietv/"]
|
||||
|
||||
film = "/film/"
|
||||
support.menu(itemlist, 'Film Anime', 'peliculas', host + "/genere/anime/")
|
||||
support.menu(itemlist, 'Film per genere', 'generos', host)
|
||||
tvshow = "/serietv/"
|
||||
support.menu(itemlist, 'Anime', 'peliculas', host + "/genere/anime/", contentType='tvshow')
|
||||
|
||||
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
@@ -39,14 +33,16 @@ def search(item, text):
|
||||
return support.dooplay_search(item)
|
||||
|
||||
|
||||
@support.scrape
|
||||
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')
|
||||
patron = '<a href="(?P<url>[^"#]+)">(?P<title>[a-zA-Z]+)'
|
||||
patronBlock='<a href="#">Genere</a><ul class="sub-menu">(?P<block>.*?)</ul>'
|
||||
action='peliculas'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log("[streamingaltadefinizione.py] video")
|
||||
|
||||
return support.dooplay_films(item)
|
||||
|
||||
|
||||
|
||||
@@ -5,26 +5,12 @@
|
||||
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = "vedohd"
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = ""
|
||||
host = ""
|
||||
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
||||
cb01Url = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
data = httptools.downloadpage(cb01Url).data
|
||||
global host, headers
|
||||
|
||||
host = scrapertoolsV2.find_single_match(data, r'class="?mega-menu-link"? href="?(https://vedohd[^/"]+)"?')+'/'
|
||||
|
||||
if 'https' not in host: # in caso cb01 cambi, si spera di riuscire ad accedere da questo URL
|
||||
host = "https://vedohd.pw/"
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
@@ -34,25 +20,16 @@ list_quality = ['HD', 'SD']
|
||||
#esclusione degli articoli 'di servizio'
|
||||
blacklist = ['CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', 'AVVISO IMPORTANTE – CB01.UNO', 'GUIDA VEDOHD']
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
logger.info("[vedohd.py] mainlist")
|
||||
findhost()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
# Main options
|
||||
itemlist = []
|
||||
film = "film-hd"
|
||||
support.menu(itemlist, 'I più votati', "peliculas", host+"ratings/?get=movies")
|
||||
support.menu(itemlist, 'I più popolari', "peliculas", host+"trending/?get=movies")
|
||||
support.menu(itemlist, 'Generi', "generos", host)
|
||||
support.menu(itemlist, 'Anno', "year", host)
|
||||
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
film = [
|
||||
('I più votati', ["ratings/?get=movies", 'peliculas']),
|
||||
('I più popolari', ["trending/?get=movies", 'peliculas']),
|
||||
('Generi', ['ratings/?get=movies', 'menu', 'genres']),
|
||||
('Anno', ["", 'menu', 'releases']),
|
||||
]
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
@@ -63,13 +40,10 @@ def search(item, text):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("[vedohd.py] video")
|
||||
|
||||
return support.dooplay_films(item, blacklist)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
findhost()
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
if link['title'] != 'Trailer':
|
||||
@@ -97,16 +71,13 @@ def findvideos(item):
|
||||
return itemlist
|
||||
|
||||
|
||||
def generos(item):
|
||||
findhost()
|
||||
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')
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
patron = '<a href="(?P<url>[^"#]+)"(?: title="[^"]+")?>(?P<title>[a-zA-Z0-9]+)'
|
||||
patronBlock = '<nav class="' + item.args + '">(?P<block>.*?)</nav>'
|
||||
action = 'peliculas'
|
||||
|
||||
|
||||
def year(item):
|
||||
findhost()
|
||||
patron = r'<a href="([^"#]+)">(\d+)'
|
||||
return support.scrape(item, patron, ['url', 'title'], patron_block='<a href="#">Anno</a><ul class="sub-menu">.*?</ul>', action='peliculas')
|
||||
return locals()
|
||||
|
||||
|
||||
def play(item):
|
||||
|
||||
@@ -318,7 +318,12 @@ def scrape(func):
|
||||
blacklist = args['blacklist'] if 'blacklist' in args else []
|
||||
data = args['data'] if 'data' in args else ''
|
||||
patron = args['patron'] if 'patron' in args else args['patronMenu'] if 'patronMenu' in args else ''
|
||||
headers = args['headers'] if 'headers' in args else func.__globals__['headers']
|
||||
if 'headers' in args:
|
||||
headers = args['headers']
|
||||
elif 'headers' in func.__globals__:
|
||||
headers = func.__globals__['headers']
|
||||
else:
|
||||
headers = ''
|
||||
patronNext = args['patronNext'] if 'patronNext' in args else ''
|
||||
patronBlock = args['patronBlock'] if 'patronBlock' in args else ''
|
||||
typeActionDict = args['type_action_dict'] if 'type_action_dict' in args else {}
|
||||
@@ -447,61 +452,51 @@ def dooplay_get_links(item, host):
|
||||
return ret
|
||||
|
||||
|
||||
@scrape
|
||||
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
|
||||
patron = '<li class="mark-[0-9]+">.*?<img.*?(?:data-lazy-)?src="(?P<thumb>[^"]+).*?(?P<episode>[0-9]+ - [0-9]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+).*?(?P<year>[0-9]{4})'
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@scrape
|
||||
def dooplay_films(item, blacklist=""):
|
||||
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>)'
|
||||
if item.args == 'searchPage':
|
||||
return dooplay_search_vars(item, blacklist)
|
||||
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'
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
patron = '<article id="post-[0-9]+" class="item movies">.*?<img src="(?!data)(?P<thumb>[^"]+)".*?<span class="quality">(?P<quality>[^<>]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></h3>.*?(?:<span>[^<>]*(?P<year>[0-9]{4})</span>|</article>).*?(?:<span>(?P<duration>[0-9]+) min</span>|</article>).*?(?:<div class="texto">(?P<plot>[^<>]+)|</article>).*?(?:genres">(?P<genre>.*?)</div>|</article>)'
|
||||
else:
|
||||
action = 'episodios'
|
||||
patron = '<article id="post-[0-9]+" class="item tvshows">.*?<img src="(?!data)(?P<thumb>[^"]+)".*?(?:<span class="quality">(?P<quality>[^<>]+))?.*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></h3>.*?(?:<span>(?P<year>[0-9]{4})</span>|</article>).*?(?:<div class="texto">(?P<plot>[^<>]+)|</article>).*?(?:genres">(?P<genre>.*?)</div>|</article>)'
|
||||
patronNext = '<div class="pagination">.*?class="current".*?<a href="([^"]+)".*?<div class="resppages">'
|
||||
addVideolibrary = False
|
||||
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
@scrape
|
||||
def dooplay_search(item, blacklist=""):
|
||||
return dooplay_search_vars(item, blacklist)
|
||||
|
||||
def dooplay_search_vars(item, blacklist):
|
||||
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>([^<>]+)'
|
||||
patron = '<div class="result-item">.*?<img src="(?P<thumb>[^"]+)".*?<span class="' + type + '">(?P<quality>[^<>]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a>.*?<span class="year">(?P<year>[0-9]{4}).*?<div class="contenido"><p>(?P<plot>[^<>]+)'
|
||||
patronNext = '<a class="arrow_pag" href="([^"]+)"><i id="nextpagination"'
|
||||
return scrape(item, patron, ['thumb', 'quality', 'url', 'title', 'year', 'plot'], blacklist=blacklist, patronNext=patronNext, action=action)
|
||||
|
||||
def fullItemlistHook(itemlist):
|
||||
# se è una next page
|
||||
if itemlist[-1].title == typo(config.get_localized_string(30992), 'color kod bold'):
|
||||
itemlist[-1].action = 'peliculas'
|
||||
itemlist[-1].args = 'searchPage'
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
def swzz_get_url(item):
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0'}
|
||||
|
||||
Reference in New Issue
Block a user