Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
7 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
301 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
320 行
すべてコピー
62 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
82 行
すべてコピー
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# ------------------------------------------------------------
コピー
コピー済み
コピー
コピー済み
#
Icarus
- XBMC Plugin
#
Ringraziamo
Icarus
crew
# Canale per cinemastreaming
# Canale per cinemastreaming
コピー
コピー済み
コピー
コピー済み
# https://alfa-addon.com/categories/icarus-addon.50/
# ------------------------------------------------------------
# ------------------------------------------------------------
import re
import re
コピー
コピー済み
コピー
コピー済み
from channels import
autoplay,
filtertools
from channels import
filtertools
from core import scrapertools, servertools, httptools
, tmdb
from core import scrapertools, servertools, httptools
from core.item import Item
from core.item import Item
コピー
コピー済み
コピー
コピー済み
from lib.unshortenit import unshorten
from platformcode import config
from platformcode import config
, logger
from core import tmdb
__channel__ = "cinemastreaming"
host = "https://www.cinemastreaming.pw"
IDIOMAS = {'Italiano': 'IT'}
list_language = IDIOMAS.values()
list_servers = ['openload', 'youtube']
list_quality = ['default']
コピー
コピー済み
コピー
コピー済み
__comprueba_enlaces__
=
config.get_setting('comprueba_enlaces', '
cinemastreaming
')
host
=
'https://
cinemastreaming
.info'
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'cinemastreaming')
headers = [['Referer', host]]
headers = [['Referer', host]]
コピー
コピー済み
コピー
コピー済み
def mainlist(item):
def mainlist(item):
コピー
コピー済み
コピー
コピー済み
logger.info("icarus.cinemastreaming mainlist")
log()
autoplay.init(item.channel, list_servers, list_quality)
# Main options
itemlist = [Item(channel=__channel__,
action="peliculas",
title="[COLOR azure]Film[/COLOR]",
url="%s/film/" % host,
extra="movie",
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
Item(channel=__channel__,
action="categorie",
title="[COLOR azure]Categorie[/COLOR]",
url=host,
extra="movie",
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
# Item(channel=__channel__,
# action="paesi",
# title="[COLOR azure]Paesi[/COLOR]",
# url=host,
# extra="movie",
# thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
Item(channel=__channel__,
action="search",
title="[COLOR yellow]Cerca Film...[/COLOR]",
extra="movie",
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"),
Item(channel=__channel__,
action="peliculas_tv",
title="[COLOR azure]SerieTV[/COLOR]",
url="%s/serie-tv/" % host,
extra="movie",
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
Item(channel=__channel__,
action="search",
title="[COLOR yellow]Cerca Serie...[/COLOR]",
url=host,
extra="tvshow",
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
autoplay.show_option(item.channel, itemlist)
return itemlist
def peliculas(item):
logger.info("[cinemastreaming.py] peliculas")
itemlist = []
# Carica la pagina
data = httptools.downloadpage(item.url, headers=headers).data
# Estrae i contenuti
bloque = scrapertools.get_match(data, r'<h1 class="Title">(.*?)</article></li></ul>')
patron = r'<a href="([^"]+)"><div class="Image">'
matches = re.compile(patron, re.DOTALL).findall(bloque)
for scrapedurl in matches:
scrapedthumbnail = ""
scrapedplot = ""
scrapedtitle = scrapedurl.replace("-", " ").replace(host, "").replace("/", "").title()
itemlist.append(
Item(channel=__channel__,
action="findvideos",
contentType="movie",
title=scrapedtitle,
fulltitle=scrapedtitle,
text_color="azure",
url=scrapedurl,
thumbnail=scrapedthumbnail,
plot=scrapedplot,
show=scrapedtitle,
extra=item.extra,
viewmode="movie_with_plot"))
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
コピー
コピー済み
コピー
コピー済み
# Next Page
# Menu Principale
next_page = scrapertools.find_single_match(data,
r'<span aria-current=\'page\' class=\'page-numbers current\'>[^<]+</span> <a class=\'page-numbers\' href=\'(.*?)\'>')
コピー
コピー済み
コピー
コピー済み
if next_page != "":
itemlist = [Item(channel = item.channel,
itemlist.append(
contentType = 'movie',
Item(channel=__channel__,
title = 'Film',
action="peliculas",
url = host + '/film/',
title="[COLOR orange]Successivo >>[/COLOR]",
action = 'video',
url=next_page,
thumbnail = '',
extra=item.extra,
fanart = ''
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
),
]
return itemlist
return itemlist
コピー
コピー済み
コピー
コピー済み
def video(item):
log()
コピー
コピー済み
コピー
コピー済み
def peliculas_tv(item):
itemlist = []
# Creo una lista Vuota
logger.info("[cinemastreaming.py] peliculas")
itemlist = []
# Carica la pagina
# Carica la pagina
data = httptools.downloadpage(item.url, headers=headers).data
data = httptools.downloadpage(item.url, headers=headers).data
コピー
コピー済み
コピー
コピー済み
block = scrapertools.find_single_match(data, r'<main>(.*?)<\/main>')
block = re.sub('\t|\n', '', block)
コピー
コピー済み
コピー
コピー済み
# Estrae i contenuti
patron = r'
<article.*?class="TPost C">.*?
<a href="([^"]+)">
.*?src="([^"]+)".*?>.*?<h3
class="
Title">([^<]+)<\/h3>(.*?)<\/article>
'
bloque = scrapertools.get_match(data, r'<h1 class="Title">(.*?)</article></li></ul>')
matches = re.compile(patron, re.DOTALL).findall(
block
)
patron = r'
<a href="([^"]+)">
<div
class="
Image">
'
matches = re.compile(patron, re.DOTALL).findall(
bloque
)
コピー
コピー済み
コピー
コピー済み
for scrapedurl
in matches:
for scrapedurl
, scrapedthumb, scrapedtitle, scrapedinfo
in matches:
scrapedthumbnail = ""
log('Info Block', scrapedinfo)
scrapedplot = ""
patron = r'<span class="Year">(.*?)<\/span>.*?<span class="Vote.*?">(.*?)<\/span>.*?<div class="Description"><p>(.*?)<\/p>.*?<p class="Genre.*?">(.*?)<\/p><p class="Director.*?">.*?<a.*?>(.*?)<\/a>.*?<p class="Actors.*?">(.*?)<\/p>'
scrapedtitle = scrapedurl.replace("-", " ").replace(host, "").replace("/", "").title()
info = re.compile(patron, re.DOTALL).findall(scrapedinfo)
itemlist.append(
for year, rating, plot, genre, director, cast in info:
Item(channel=__channel__,
genre = scrapertools.find_multiple_matches(genre, r'<a.*?>(.*?)<\/a>')
action="episodios",
cast = scrapertools.find_multiple_matches(cast, r'<a.*?>(.*?)<\/a>')
contentType="tvshow",
title=scrapedtitle,
fulltitle=scrapedtitle,
text_color="azure",
url=scrapedurl,
thumbnail=scrapedthumbnail,
plot=scrapedplot,
show=scrapedtitle,
extra=item.extra,
viewmode="movie_with_plot"))
コピー
コピー済み
コピー
コピー済み
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
infoLabels = {}
infoLabels['Year'] = year
next_page = scrapertools.find_single_match(data,
infoLabels['Rating'] = rating
r'<span aria-current=\'page\' class=\'page-numbers current\'>[^<]+</span> <a class=\'page-numbers\' href=\'(.*?)\'>')
infoLabels['Plot'] = plot
infoLabels['Genre'] = genre
if next_page != "":
infoLabels['Director'] = director
itemlist.append(
infoLabels['Cast'] = cast
Item(channel=__channel__,
action="peliculas_tv",
title="[COLOR orange]Successivo >>[/COLOR]",
url=next_page,
extra=item.extra,
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
return itemlist
def episodios(item):
logger.info("icarus.cinemastreaming peliculas_tv")
itemlist = []
# Carica la pagina
data = httptools.downloadpage(item.url, headers=headers).data
bloque = scrapertools.get_match(data, r'<main>(.*?)</main>')
# Estrae i contenuti
patron = r'<td class="MvTbTtl"><a href="([^"]+)">(.*?)<'
matches = re.compile(patron, re.DOTALL).findall(bloque)
for scrapedurl, scraped2 in matches:
scrapedtitle = scrapedurl
scrapedtitle = scrapedtitle.replace(host, "")
scrapedtitle = scrapedtitle.replace("episode", "")
scrapedtitle = scrapedtitle.replace("/", "").title()
scrapedtitle = scrapedtitle + " " + scraped2
itemlist.append(
Item(channel=__channel__,
action="findvideos",
title=scrapedtitle,
fulltitle=scrapedtitle,
text_color="azure",
url=scrapedurl,
thumbnail=item.thumbnail))
return itemlist
def categorie(item):
logger.info("[cinemastreaming.py] categorie")
itemlist = []
# Carica la pagina
data = httptools.downloadpage(item.url, headers=headers).data
# Estrae i contenuti
bloque = scrapertools.get_match(data, r'Categorie</a><ul class="sub-menu">(.*?)</ul>')
patronvideos = r'<li id="menu-item-.*?category.*?<a href="([^"]+)">([^"]+)</a></li>'
matches = re.compile(patronvideos, re.DOTALL).finditer(bloque)
for match in matches:
itemlist.append(
Item(channel=__channel__,
action="peliculas",
title=match.group(2),
text_color="azure",
url=match.group(1),
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png",
folder=True))
return itemlist
# def paesi(item):
# logger.info("[cinemastreaming.py] paesi")
# itemlist = []
# if item.url == "":
# item.url = host
# # Carica la pagina
# data = httptools.downloadpage(item.url, headers=headers).data
# # Estrae i contenuti
# patronvideos = r'<li id="menu-item-.*?country.*?<a href="([^"]+)">([^"]+)</a></li>'
# matches = re.compile(patronvideos, re.DOTALL).finditer(data)
# for match in matches:
# itemlist.append(
# Item(channel=__channel__,
# action="peliculas",
# title=match.group(2),
# text_color="azure",
# url=match.group(1),
# thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png",
# folder=True))
# return itemlist
def listserie(item):
# da implementare
return None
def findvideos(item):
logger.info("[cinemastreaming.py] findvideos")
# Carica la pagina
data = httptools.downloadpage(item.url, headers=headers).data
urls = set()
if 'trdownload' in data:
data = data.replace("&", "&")
for url in scrapertools.find_multiple_matches(data, r'href="(%s/\?trdownload[^"]+?)"' % host):
url, c = unshorten(url, 'adfly')
urls.add(url)
itemlist = servertools.find_video_items(data=str(urls) + data)
for videoitem in itemlist:
videoitem.title = "".join([item.title, '[COLOR green][B]' + videoitem.title + '[/B][/COLOR]'])
videoitem.fulltitle = item.fulltitle
videoitem.show = item.show
videoitem.thumbnail = item.thumbnail
videoitem.channel = __channel__
videoitem.contentType = item.contentType
videoitem.language = IDIOMAS['Italiano']
# Requerido para Filtrar enlaces
if __comprueba_enlaces__:
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
# Requerido para FilterTools
itemlist = filtertools.get_links(itemlist, item, list_language)
# Requerido para AutoPlay
autoplay.start(itemlist, item)
if item.contentType != 'episode':
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
itemlist.append(
itemlist.append(
コピー
コピー済み
コピー
コピー済み
Item(channel=item.channel,
title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url,
Item(channel=item.channel,
action="
add_pelicula_to_library", extra="
findvideos",
contentT
itl
e=item.
contentTitle))
action="
findvideos",
contentT
yp
e=item.
contentType,
title=scrapedtitle,
fulltitle=scrapedtitle,
url=scrapedurl,
thumbnail=scrapedthumb,
infoLabels = infoLabels,
show=scrapedtitle))
return itemlist
return itemlist
コピー
コピー済み
コピー
コピー済み
def
search(item, texto
):
def
log(stringa1="", stringa2=""
):
logger.info("[
cinemastreaming.py]
" +
item.url
+ "
search
" +
texto)
import inspect, os
item.url = host
+ "
/?s=" + texto
from platformcode import logger
try:
logger.info("[
" +
os.path.basename(__file__)
+ "
] - [
" +
inspect.stack()[1][3]
+ "
] " + str(stringa1) + str(stringa2))
if item.extra == "movie":
return peliculas(item)
if item.extra == "tvshow":
return peliculas_tv(item)
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
logger.error("%s" % line)
return []
保存された差分
原文
ファイルを開く
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Icarus - XBMC Plugin # Canale per cinemastreaming # https://alfa-addon.com/categories/icarus-addon.50/ # ------------------------------------------------------------ import re from channels import autoplay, filtertools from core import scrapertools, servertools, httptools, tmdb from core.item import Item from lib.unshortenit import unshorten from platformcode import config, logger __channel__ = "cinemastreaming" host = "https://www.cinemastreaming.pw" IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() list_servers = ['openload', 'youtube'] list_quality = ['default'] __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'cinemastreaming') __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'cinemastreaming') headers = [['Referer', host]] def mainlist(item): logger.info("icarus.cinemastreaming mainlist") autoplay.init(item.channel, list_servers, list_quality) # Main options itemlist = [Item(channel=__channel__, action="peliculas", title="[COLOR azure]Film[/COLOR]", url="%s/film/" % host, extra="movie", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=__channel__, action="categorie", title="[COLOR azure]Categorie[/COLOR]", url=host, extra="movie", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), # Item(channel=__channel__, # action="paesi", # title="[COLOR azure]Paesi[/COLOR]", # url=host, # extra="movie", # thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=__channel__, action="search", title="[COLOR yellow]Cerca Film...[/COLOR]", extra="movie", thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"), Item(channel=__channel__, action="peliculas_tv", title="[COLOR azure]SerieTV[/COLOR]", url="%s/serie-tv/" % host, extra="movie", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=__channel__, action="search", title="[COLOR yellow]Cerca Serie...[/COLOR]", url=host, extra="tvshow", thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")] autoplay.show_option(item.channel, itemlist) return itemlist def peliculas(item): logger.info("[cinemastreaming.py] peliculas") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data # Estrae i contenuti bloque = scrapertools.get_match(data, r'<h1 class="Title">(.*?)</article></li></ul>') patron = r'<a href="([^"]+)"><div class="Image">' matches = re.compile(patron, re.DOTALL).findall(bloque) for scrapedurl in matches: scrapedthumbnail = "" scrapedplot = "" scrapedtitle = scrapedurl.replace("-", " ").replace(host, "").replace("/", "").title() itemlist.append( Item(channel=__channel__, action="findvideos", contentType="movie", title=scrapedtitle, fulltitle=scrapedtitle, text_color="azure", url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot, show=scrapedtitle, extra=item.extra, viewmode="movie_with_plot")) tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) # Next Page next_page = scrapertools.find_single_match(data, r'<span aria-current=\'page\' class=\'page-numbers current\'>[^<]+</span> <a class=\'page-numbers\' href=\'(.*?)\'>') if next_page != "": itemlist.append( Item(channel=__channel__, action="peliculas", title="[COLOR orange]Successivo >>[/COLOR]", url=next_page, extra=item.extra, thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png")) return itemlist def peliculas_tv(item): logger.info("[cinemastreaming.py] peliculas") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data # Estrae i contenuti bloque = scrapertools.get_match(data, r'<h1 class="Title">(.*?)</article></li></ul>') patron = r'<a href="([^"]+)"><div class="Image">' matches = re.compile(patron, re.DOTALL).findall(bloque) for scrapedurl in matches: scrapedthumbnail = "" scrapedplot = "" scrapedtitle = scrapedurl.replace("-", " ").replace(host, "").replace("/", "").title() itemlist.append( Item(channel=__channel__, action="episodios", contentType="tvshow", title=scrapedtitle, fulltitle=scrapedtitle, text_color="azure", url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot, show=scrapedtitle, extra=item.extra, viewmode="movie_with_plot")) tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) next_page = scrapertools.find_single_match(data, r'<span aria-current=\'page\' class=\'page-numbers current\'>[^<]+</span> <a class=\'page-numbers\' href=\'(.*?)\'>') if next_page != "": itemlist.append( Item(channel=__channel__, action="peliculas_tv", title="[COLOR orange]Successivo >>[/COLOR]", url=next_page, extra=item.extra, thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png")) return itemlist def episodios(item): logger.info("icarus.cinemastreaming peliculas_tv") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data bloque = scrapertools.get_match(data, r'<main>(.*?)</main>') # Estrae i contenuti patron = r'<td class="MvTbTtl"><a href="([^"]+)">(.*?)<' matches = re.compile(patron, re.DOTALL).findall(bloque) for scrapedurl, scraped2 in matches: scrapedtitle = scrapedurl scrapedtitle = scrapedtitle.replace(host, "") scrapedtitle = scrapedtitle.replace("episode", "") scrapedtitle = scrapedtitle.replace("/", "").title() scrapedtitle = scrapedtitle + " " + scraped2 itemlist.append( Item(channel=__channel__, action="findvideos", title=scrapedtitle, fulltitle=scrapedtitle, text_color="azure", url=scrapedurl, thumbnail=item.thumbnail)) return itemlist def categorie(item): logger.info("[cinemastreaming.py] categorie") itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data # Estrae i contenuti bloque = scrapertools.get_match(data, r'Categorie</a><ul class="sub-menu">(.*?)</ul>') patronvideos = r'<li id="menu-item-.*?category.*?<a href="([^"]+)">([^"]+)</a></li>' matches = re.compile(patronvideos, re.DOTALL).finditer(bloque) for match in matches: itemlist.append( Item(channel=__channel__, action="peliculas", title=match.group(2), text_color="azure", url=match.group(1), thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png", folder=True)) return itemlist # def paesi(item): # logger.info("[cinemastreaming.py] paesi") # itemlist = [] # if item.url == "": # item.url = host # # Carica la pagina # data = httptools.downloadpage(item.url, headers=headers).data # # Estrae i contenuti # patronvideos = r'<li id="menu-item-.*?country.*?<a href="([^"]+)">([^"]+)</a></li>' # matches = re.compile(patronvideos, re.DOTALL).finditer(data) # for match in matches: # itemlist.append( # Item(channel=__channel__, # action="peliculas", # title=match.group(2), # text_color="azure", # url=match.group(1), # thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png", # folder=True)) # return itemlist def listserie(item): # da implementare return None def findvideos(item): logger.info("[cinemastreaming.py] findvideos") # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data urls = set() if 'trdownload' in data: data = data.replace("&", "&") for url in scrapertools.find_multiple_matches(data, r'href="(%s/\?trdownload[^"]+?)"' % host): url, c = unshorten(url, 'adfly') urls.add(url) itemlist = servertools.find_video_items(data=str(urls) + data) for videoitem in itemlist: videoitem.title = "".join([item.title, '[COLOR green][B]' + videoitem.title + '[/B][/COLOR]']) videoitem.fulltitle = item.fulltitle videoitem.show = item.show videoitem.thumbnail = item.thumbnail videoitem.channel = __channel__ videoitem.contentType = item.contentType videoitem.language = IDIOMAS['Italiano'] # Requerido para Filtrar enlaces if __comprueba_enlaces__: itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) # Requerido para FilterTools itemlist = filtertools.get_links(itemlist, item, list_language) # Requerido para AutoPlay autoplay.start(itemlist, item) if item.contentType != 'episode': if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) return itemlist def search(item, texto): logger.info("[cinemastreaming.py] " + item.url + " search " + texto) item.url = host + "/?s=" + texto try: if item.extra == "movie": return peliculas(item) if item.extra == "tvshow": return peliculas_tv(item) # Continua la ricerca in caso di errore except: import sys for line in sys.exc_info(): logger.error("%s" % line) return []
変更されたテキスト
ファイルを開く
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Ringraziamo Icarus crew # Canale per cinemastreaming # ------------------------------------------------------------ import re from channels import filtertools from core import scrapertools, servertools, httptools from core.item import Item from platformcode import config from core import tmdb host = 'https://cinemastreaming.info' headers = [['Referer', host]] def mainlist(item): log() # Menu Principale itemlist = [Item(channel = item.channel, contentType = 'movie', title = 'Film', url = host + '/film/', action = 'video', thumbnail = '', fanart = '' ), ] return itemlist def video(item): log() itemlist = [] # Creo una lista Vuota # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data block = scrapertools.find_single_match(data, r'<main>(.*?)<\/main>') block = re.sub('\t|\n', '', block) patron = r'<article.*?class="TPost C">.*?<a href="([^"]+)">.*?src="([^"]+)".*?>.*?<h3 class="Title">([^<]+)<\/h3>(.*?)<\/article>' matches = re.compile(patron, re.DOTALL).findall(block) for scrapedurl, scrapedthumb, scrapedtitle, scrapedinfo in matches: log('Info Block', scrapedinfo) patron = r'<span class="Year">(.*?)<\/span>.*?<span class="Vote.*?">(.*?)<\/span>.*?<div class="Description"><p>(.*?)<\/p>.*?<p class="Genre.*?">(.*?)<\/p><p class="Director.*?">.*?<a.*?>(.*?)<\/a>.*?<p class="Actors.*?">(.*?)<\/p>' info = re.compile(patron, re.DOTALL).findall(scrapedinfo) for year, rating, plot, genre, director, cast in info: genre = scrapertools.find_multiple_matches(genre, r'<a.*?>(.*?)<\/a>') cast = scrapertools.find_multiple_matches(cast, r'<a.*?>(.*?)<\/a>') infoLabels = {} infoLabels['Year'] = year infoLabels['Rating'] = rating infoLabels['Plot'] = plot infoLabels['Genre'] = genre infoLabels['Director'] = director infoLabels['Cast'] = cast itemlist.append( Item(channel=item.channel, action="findvideos", contentType=item.contentType, title=scrapedtitle, fulltitle=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumb, infoLabels = infoLabels, show=scrapedtitle)) return itemlist def log(stringa1="", stringa2=""): import inspect, os from platformcode import logger logger.info("[" + os.path.basename(__file__) + "] - [" + inspect.stack()[1][3] + "] " + str(stringa1) + str(stringa2))
違いを見つける