KoD 1.4.1
- ridisegnata la finestra della scelta film/serietv quando si aggiunge in videoteca\n- modifiche minori, qualche fix ai canali/server ed alla ricerca alternativa\n
This commit is contained in:
@@ -54,18 +54,17 @@ from core.item import Item # per newest
|
||||
|
||||
# se il sito ha un link per ottenere l'url corretto in caso di oscuramenti
|
||||
# la funzione deve ritornare l'indirizzo corretto, verrà chiamata solo se necessario (link primario irraggiungibile)
|
||||
def findhost():
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
||||
def findhost(url):
|
||||
permUrl = httptools.downloadpage(url, follow_redirects=False).headers
|
||||
if 'google' in permUrl['location']:
|
||||
host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
else:
|
||||
host = permUrl['location']
|
||||
return host
|
||||
|
||||
# se si usa findhost
|
||||
# se si usa findhost metti in channels.json l'url del sito che contiene sempre l'ultimo dominio
|
||||
host = config.get_channel_url(findhost)
|
||||
# se non si usa (metti l'url in channels.json)
|
||||
# se non si usa metti direttamente l'url finale in channels.json
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@@ -17,10 +17,9 @@ from core import scrapertools, httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
|
||||
def findhost():
|
||||
data = httptools.downloadpage('https://altadefinizione01-nuovo.info/').data
|
||||
def findhost(url):
|
||||
data = httptools.downloadpage(url).data
|
||||
host = scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
return host
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
def findhost():
|
||||
data = support.httptools.downloadpage('https://altadefinizione-nuovo.me/').data
|
||||
def findhost(url):
|
||||
data = support.httptools.downloadpage(url).data
|
||||
host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
return host
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ from lib import unshortenit
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def findhost():
|
||||
host = httptools.downloadpage('https://cb01.uno/', follow_redirect=True).url
|
||||
def findhost(url):
|
||||
host = httptools.downloadpage(url, follow_redirect=True).url
|
||||
if host == 'https://cb01.uno/':
|
||||
host = support.match(host, patron=r'<a href="([^"]+)', debug=True).match
|
||||
return host
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"active": true,
|
||||
"thumbnail": "cinemalibero.png",
|
||||
"banner": "cinemalibero.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"not_active": ["include_in_newest_anime", "include_in_newest_peliculas"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ from platformcode import config
|
||||
|
||||
|
||||
# rimanda a .today che contiene tutti link a .plus
|
||||
# def findhost():
|
||||
# def findhost(url):
|
||||
# permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
|
||||
# try:
|
||||
# import urlparse
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
from core import httptools, support
|
||||
from core.item import Item
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False, only_headers=True).headers
|
||||
def findhost(url):
|
||||
permUrl = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers
|
||||
host = 'https://'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
return host
|
||||
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ from core import support
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def findhost():
|
||||
return support.httptools.downloadpage('https://film4k-nuovo.link').url
|
||||
def findhost(url):
|
||||
return support.httptools.downloadpage(url).url
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from core import httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
# def findhost():
|
||||
# def findhost(url):
|
||||
# page = httptools.downloadpage("https://filmpertutti.nuovo.live/").data
|
||||
# url = scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è <a href="([^"]+)')
|
||||
# return url
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
from core import support
|
||||
|
||||
def findhost():
|
||||
data = support.httptools.downloadpage('https://lagazzettadelcorsaro.com/').data
|
||||
def findhost(url):
|
||||
data = support.httptools.downloadpage(url).data
|
||||
url = support.scrapertools.find_single_match(data, '<li><a href="([^"]+)')
|
||||
return url[:-1] if url.endswith('/') else url
|
||||
|
||||
|
||||
@@ -4,17 +4,9 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
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'}
|
||||
|
||||
|
||||
headers = {'X-Requested-With': 'XMLHttpRequest'}
|
||||
|
||||
|
||||
@support.scrape
|
||||
|
||||
@@ -7,7 +7,7 @@ from core import support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
# def findhost():
|
||||
# def findhost(url):
|
||||
# return 'https://' + support.match('https://netfreex.uno/', patron='value="site:([^"]+)"').match
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
+18
-20
@@ -7,15 +7,13 @@
|
||||
from core import support, jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
import json, datetime
|
||||
import datetime
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
headers = [['Accept', 'application/ld+json']]
|
||||
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
# menu = [
|
||||
@@ -57,8 +55,9 @@ def peliculas(item):
|
||||
item.contentType='movie'
|
||||
else:
|
||||
item.contentType='tvshow'
|
||||
itemlist.extend(get_itemlist_element(element, item))
|
||||
itemlist.append(get_itemlist_element(element, item))
|
||||
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
try:
|
||||
if support.inspect.stack()[1][3] not in ['newest']:
|
||||
support.nextPage(itemlist, item, next_page=json_object['hydra:view']['hydra:next'])
|
||||
@@ -106,13 +105,14 @@ def search(item, texto):
|
||||
json_object = jsontools.load(data)
|
||||
for movie in json_object['hydra:member']:
|
||||
item.contentType='movie'
|
||||
itemlist.extend(get_itemlist_element(movie,item))
|
||||
itemlist.append(get_itemlist_element(movie,item))
|
||||
item.url = host + "/api/shows?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for tvshow in json_object['hydra:member']:
|
||||
item.contentType='tvshow'
|
||||
itemlist.extend(get_itemlist_element(tvshow,item))
|
||||
itemlist.append(get_itemlist_element(tvshow,item))
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
@@ -121,6 +121,7 @@ def search(item, texto):
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def search_movie_by_genre(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
@@ -134,6 +135,7 @@ def search_movie_by_genre(item):
|
||||
url="%s/api/movies?genres.id=%s" %(host,genre['id'])))
|
||||
return support.thumb(itemlist, True)
|
||||
|
||||
|
||||
def search_movie_by_year(item):
|
||||
support.info()
|
||||
now = datetime.datetime.now()
|
||||
@@ -149,6 +151,7 @@ def search_movie_by_year(item):
|
||||
action="peliculas"))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
@@ -170,9 +173,9 @@ def findvideos(item):
|
||||
pass
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def get_itemlist_element(element,item):
|
||||
support.info()
|
||||
itemlist=[]
|
||||
contentSerieName = ''
|
||||
contentTitle =''
|
||||
try:
|
||||
@@ -189,13 +192,13 @@ def get_itemlist_element(element,item):
|
||||
except:
|
||||
scrapedplot = ""
|
||||
try:
|
||||
scrapedthumbnail="http://"+element['posterPath']
|
||||
scrapedthumbnail="https:"+element['bestPosters'].values()[0]
|
||||
except:
|
||||
scrapedthumbnail=""
|
||||
try:
|
||||
scrapedfanart="http://"+element['backdropPath']
|
||||
except:
|
||||
scrapedfanart=""
|
||||
# try:
|
||||
# scrapedfanart="http:"+element['backdropPath']
|
||||
# except:
|
||||
# scrapedfanart=""
|
||||
|
||||
infoLabels = {}
|
||||
if item.contentType=='movie':
|
||||
@@ -210,20 +213,15 @@ def get_itemlist_element(element,item):
|
||||
quality=''
|
||||
url="%s%s"
|
||||
|
||||
if item.contentType=='movie':
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist)
|
||||
itemlist.append(
|
||||
item.clone(action=next_action,
|
||||
return item.clone(action=next_action,
|
||||
title=support.typo(scrapedtitle, 'bold') + quality,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
plot=scrapedplot,
|
||||
fanart=scrapedfanart,
|
||||
# fanart=scrapedfanart,
|
||||
thumbnail=scrapedthumbnail,
|
||||
contentTitle=contentTitle,
|
||||
contentSerieName=contentSerieName,
|
||||
contentType=item.contentType,
|
||||
url=url % (host, element['@id']),
|
||||
infoLabels=infoLabels))
|
||||
|
||||
return itemlist
|
||||
infoLabels=infoLabels)
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@
|
||||
|
||||
|
||||
from core import support
|
||||
def findhost():
|
||||
return support.match('https://nuovoindirizzo.info/seriehd/', patron=r'<h2[^>]+><a href="([^"]+)"').match
|
||||
def findhost(url):
|
||||
return support.match(url, patron=r'<h2[^>]+><a href="([^"]+)"').match
|
||||
|
||||
host = support.config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
@@ -31,7 +31,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + "/?s=" + texto
|
||||
item.url = host + "/search/" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore .
|
||||
|
||||
@@ -21,8 +21,8 @@ from platformcode import config
|
||||
from core.item import Item
|
||||
|
||||
|
||||
def findhost():
|
||||
host = support.match('https://serietvonline.online', patron=r'href="([^"]+)">\s*cliccando qui').matches[-1]
|
||||
def findhost(url):
|
||||
host = support.match(url, patron=r'href="([^"]+)">\s*cliccando qui').matches[-1]
|
||||
return host
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
|
||||
@@ -13,8 +13,8 @@ else:
|
||||
from urllib import unquote
|
||||
|
||||
|
||||
def findhost():
|
||||
data = httptools.downloadpage('https://www.popcornstream-nuovo-indirizzo.online/').data
|
||||
def findhost(url):
|
||||
data = httptools.downloadpage(url).data
|
||||
return support.scrapertools.find_single_match(data, '<a href="([^"]+)')
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
|
||||
@@ -12,8 +12,8 @@ from platformcode import logger
|
||||
from platformcode import config, unify
|
||||
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.tantifilm.wiki/').data
|
||||
def findhost(url):
|
||||
permUrl = httptools.downloadpage(url).data
|
||||
host = scrapertools.find_single_match(permUrl, r'Nuovo indirizzo: <a href="([^"]+)')
|
||||
return host
|
||||
|
||||
|
||||
@@ -4,18 +4,11 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from xml.dom import minidom
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
|
||||
|
||||
host = 'http://api.radiotime.com'
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
@support.scrape
|
||||
def mainlist(item):
|
||||
item.url = host
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
try:
|
||||
import urllib.parse as urllib
|
||||
except ImportError:
|
||||
import urllib
|
||||
|
||||
from core import jsontools
|
||||
from core import jsontools, httptools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import config
|
||||
|
||||
CHANNELNAME = "youtube_channel"
|
||||
YOUTUBE_V3_API_KEY = "AIzaSyCjsmBT0JZy1RT-PLwB-Zkfba87sa2inyI"
|
||||
|
||||
Reference in New Issue
Block a user