15 Commits

Author SHA1 Message Date
marco
fdfaacbd4e Migliorie 2022-10-10 20:05:36 +02:00
marco
dc96c1705d Cambio UA 2022-10-08 13:19:28 +02:00
marco
c0a5629d8f ops 2022-10-06 18:58:09 +02:00
marco
dc9f552708 ops 2022-10-06 18:56:53 +02:00
marco
746738a868 prova 2022-10-06 18:55:28 +02:00
marco
a0e45bd896 prova 2022-10-05 21:14:52 +02:00
marco
073b755100 prova 2022-10-04 20:48:31 +02:00
marco
26ac0660f7 prova 2022-10-04 20:45:24 +02:00
marco
5a2c9fb6ac prova 2022-10-01 19:01:21 +02:00
marco
b5b4427941 prova 2022-10-01 18:52:52 +02:00
marco
7ff96d2248 prova 2022-10-01 18:47:04 +02:00
marco
f544552b5f prova 2022-09-30 20:20:08 +02:00
marco
b0a4688038 ops 2022-09-30 20:15:49 +02:00
marco
4e1e761c0a Prova 2022-09-30 20:08:03 +02:00
marco
f394372f78 Prova 2022-09-30 18:50:34 +02:00
1251 changed files with 3039 additions and 6846 deletions

View File

@@ -1,34 +0,0 @@
name: Update channel domains
on:
workflow_dispatch:
schedule:
- cron: '30 17 * * *'
push:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.7'
architecture: 'x64'
- name: Install dependencies
run: pip install requests
- name: Update domains
run: python tools/updateDomains.py
- name: Commit & Push changes
uses: actions-js/push@master
with:
message: "Aggiornamento domini"
branch: "master"
github_token: ${{ secrets.API_TOKEN_GITHUB }}

0
.github/ISSUE_TEMPLATE/canale-non-funzionante.md vendored Executable file → Normal file
View File

0
.github/ISSUE_TEMPLATE/server-non-funzionante.md vendored Executable file → Normal file
View File

0
.github/ISSUE_TEMPLATE/test-canale.md vendored Executable file → Normal file
View File

13
.github/workflows/tests.yml vendored Executable file → Normal file
View File

@@ -1,25 +1,28 @@
name: Test Suite name: Test Suite
on: on:
workflow_dispatch: workflow_dispatch:
schedule:
- cron: '00 15 * * *'
jobs: jobs:
tests: tests:
runs-on: macos-latest runs-on: ubuntu-latest
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.3.0 uses: actions/setup-python@v1
with: with:
python-version: 3.9 python-version: 3.8
- name: Run tests - name: Run tests
run: | run: |
export KODI_INTERACTIVE=0
./tests/run.sh ./tests/run.sh
- name: Commit & Push changes - name: Commit & Push changes
uses: dmnemec/copy_file_to_another_repo_action@main uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env: env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with: with:

0
.github/workflows/updateDomains.yml vendored Executable file → Normal file
View File

0
.github/workflows/updateDomainsStable.yml vendored Executable file → Normal file
View File

2
.gitignore vendored Executable file → Normal file
View File

@@ -9,5 +9,3 @@ __pycache__/
.vscode/settings.json .vscode/settings.json
bin/ bin/
lib/abi lib/abi
tests/home/
reports/

0
CONTRIBUTING.md Executable file → Normal file
View File

0
LICENSE Executable file → Normal file
View File

0
README.md Executable file → Normal file
View File

0
__init__.py Executable file → Normal file
View File

12
addon.xml Executable file → Normal file
View File

@@ -1,10 +1,11 @@
<addon id="plugin.video.kod" name="Kodi on Demand" version="1.7.7" provider-name="KoD Team"> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="1.7.6" provider-name="KoD Team">
<requires> <requires>
<!-- <import addon="script.module.libtorrent" optional="true"/> --> <!-- <import addon="script.module.libtorrent" optional="true"/> -->
<import addon="metadata.themoviedb.org" optional="true"/> <import addon="metadata.themoviedb.org"/>
<import addon="metadata.tvshows.themoviedb.org" optional="true"/> <import addon="metadata.tvshows.themoviedb.org"/>
<!-- <import addon="metadata.tvdb.com"/> --> <!-- <import addon="metadata.tvdb.com"/> -->
<import addon="script.module.web-pdb" />
</requires> </requires>
<extension point="xbmc.python.pluginsource" library="default.py"> <extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides> <provides>video</provides>
@@ -28,6 +29,9 @@
<screenshot>resources/media/screenshot-3.png</screenshot> <screenshot>resources/media/screenshot-3.png</screenshot>
</assets> </assets>
<news>- fix di routine ai canali/server <news>- fix di routine ai canali/server
- disabilitati cb01anime e tantifilm
- aggiunta opzione "mostra server" nel menu contestuale della libreria
- più opzioni per quanto riguarda l'aggiornamento della videoteca
</news> </news>
<description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description> <description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description>
<disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR] <disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR]

44
channels.json Executable file → Normal file
View File

@@ -1,38 +1,38 @@
{ {
"direct": { "direct": {
"altadefinizione01": "https://altadefinizione01.pet", "altadefinizione01": "https://www.altadefinizione01.sbs",
"animealtadefinizione": "http://ww38.animealtadefinizione.it", "animealtadefinizione": "https://www.animealtadefinizione.it",
"animeforce": "https://www.animeforce.it", "animeforce": "https://www.animeforce.it",
"animesaturn": "https://www.animesaturn.cx", "animesaturn": "https://www.animesaturn.in",
"animeunity": "https://www.animeunity.tv", "animeunity": "https://www.animeunity.tv",
"animeworld": "https://www.animeworld.so", "animeuniverse": "https://www.animeuniverse.it",
"aniplay": "https://aniplay.co", "animeworld": "https://www.animeworld.tv",
"casacinema": "https://casacinema.media", "aniplay": "https://aniplay.it",
"cb01anime": "https://cb01new.one", "casacinema": "https://www.casacinema.lol",
"cb01anime": "https://www.cineblog01.red",
"cinemalibero": "https://cinemalibero.cafe", "cinemalibero": "https://cinemalibero.cafe",
"cinetecadibologna": "http://cinestore.cinetecadibologna.it", "cinetecadibologna": "http://cinestore.cinetecadibologna.it",
"dinostreaming": "https://dinostreaming.it",
"discoveryplus": "https://www.discoveryplus.com", "discoveryplus": "https://www.discoveryplus.com",
"dreamsub": "https://www.animeworld.so", "dreamsub": "https://www.animeworld.tv",
"eurostreaming": "https://eurostreaming.lifestyle", "eurostreaming": "https://eurostreaming.party",
"eurostreaming_actor": "https://eurostreaming.my", "eurostreaming_actor": "https://eurostreaming.actor",
"filmstreaming": "https://film-streaming-ita.cam", "filmstreaming": "https://filmstreaming.media",
"guardaseriecam": "https://guardaserie.kitchen", "guardaseriecam": "https://guardaserie.cam",
"hd4me": "https://hd4me.net", "hd4me": "https://hd4me.net",
"ilcorsaronero": "https://ilcorsaronero.link", "ilcorsaronero": "https://ilcorsaronero.link",
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.foo", "ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.sbs",
"italiafilm": "https://italia-film.biz",
"mediasetplay": "https://mediasetinfinity.mediaset.it", "mediasetplay": "https://mediasetinfinity.mediaset.it",
"mondoserietv": "http://ww25.mondoserietv.club/?subid1=20230304-0434-261c-9cb0-a0044930e0a9", "mondoserietv": "https://mondoserietv.club",
"paramount": "https://www.mtv.it", "paramount": "https://www.mtv.it",
"piratestreaming": "https://piratestreaming.design", "piratestreaming": "https://www.piratestreaming.design",
"plutotv": "https://pluto.tv", "plutotv": "https://pluto.tv",
"raiplay": "https://www.raiplay.it", "raiplay": "https://www.raiplay.it",
"serietvu": "http://ww1.serietvu.live/?sub1=47fb879a-5325-11ee-94a7-cc35006f53d1", "serietvu": "https://www.serietvu.live",
"streamingcommunity": "https://streamingcommunity.ooo", "streamingcommunity": "https://streamingcommunity.tech",
"streamingita": "https://streamingita.click", "streamingita": "https://www.streamingita.wtf",
"tantifilm": "https://tantifilm.name", "streamtime": "https://t.me/s/StreamTime",
"toonitalia": "https://toonitalia.xyz" "tantifilm": "https://www.tantifilm.yachts",
"toonitalia": "https://toonitalia.co"
}, },
"findhost": { "findhost": {
"altadefinizione": "https://altadefinizione.nuovo.live", "altadefinizione": "https://altadefinizione.nuovo.live",

0
channels/0example.json.txt Executable file → Normal file
View File

0
channels/0example.py.txt Executable file → Normal file
View File

1
channels/1337x.json Executable file → Normal file
View File

@@ -6,7 +6,6 @@
"thumbnail": "1337x.png", "thumbnail": "1337x.png",
"banner": "1337x.png", "banner": "1337x.png",
"categories": ["movie", "tvshow", "torrent"], "categories": ["movie", "tvshow", "torrent"],
"not_active": ["include_in_newest"],
"settings": [ "settings": [
{ {
"id": "itaSearch", "id": "itaSearch",

4
channels/1337x.py Executable file → Normal file
View File

@@ -103,13 +103,13 @@ def peliculas(item):
data = ' ' data = ' '
else: else:
data = support.match(item).data data = support.match(item).data
# debug = True
if item.args == 'search': if item.args == 'search':
sceneTitle = 'undefined' sceneTitle = 'undefined'
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<(?:[^>]+>){3,7}(?P<seed>[^<]+)<(?:[^>]+>){6}(?P<size>[^<]+)<span' patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<(?:[^>]+>){3,7}(?P<seed>[^<]+)<(?:[^>]+>){6}(?P<size>[^<]+)<span'
patronNext = r'"([^"]+)">&gt;&gt;' patronNext = r'"([^"]+)">&gt;&gt;'
elif item.contentType == 'movie': elif item.contentType == 'movie':
patron = r'<img[^>]+data-original="(?P<thumb>[^"]+)(?:[^>]+>){15}(?P<title>[^<]+).*?<p>(?P<plot>[^<]+).*?<a href="(?P<url>[^"]+)' patron = r'<img alt="[^"]*" data-original="(?P<thumb>[^"]+)(?:[^>]+>){15}(?P<title>[^<]+)(?:[^>]+>){18,23}\s*<a href="(?P<url>[^"]+)'
patronNext = r'"([^"]+)">&gt;&gt;' patronNext = r'"([^"]+)">&gt;&gt;'
else: else:
action = 'seasons' action = 'seasons'

0
channels/__init__.py Executable file → Normal file
View File

0
channels/accuradio.json Executable file → Normal file
View File

3
channels/accuradio.py Executable file → Normal file
View File

@@ -35,9 +35,8 @@ def mainlist(item):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
# debug=True
action = 'playradio' action = 'playradio'
patron = r'data-id="(?P<id>[^"]+)"\s*data-oldid="(?P<oldid>[^"]+)".*?data-name="(?P<title>[^"]+)(?:[^>]+>){2}<img src="(?P<thumb>[^"]+)(?:[^>]+>){16}\s*(?P<plot>[^<]+)' patron = r'data-id="(?P<id>[^"]+)"\s*data-oldid="(?P<oldid>[^"]+)".*?data-name="(?P<title>[^"]+)(?:[^>]+>){5}<img class="[^"]+"\s*src="(?P<thumb>[^"]+)(?:[^>]+>){6}\s*(?P<plot>[^<]+)'
return locals() return locals()

3
channels/altadefinizione.json Executable file → Normal file
View File

@@ -6,6 +6,5 @@
"thumbnail": "altadefinizione.png", "thumbnail": "altadefinizione.png",
"banner": "altadefinizione.png", "banner": "altadefinizione.png",
"categories": ["movie", "tvshow", "vos"], "categories": ["movie", "tvshow", "vos"],
"settings": [], "settings": []
"not_active": ["include_in_newest"]
} }

116
channels/altadefinizione.py Executable file → Normal file
View File

@@ -4,59 +4,53 @@
# ------------------------------------------------------------ # ------------------------------------------------------------
from core import httptools, support, tmdb, scrapertools from core import httptools, support
from platformcode import config, logger from platformcode import config, logger
import re
def findhost(url): def findhost(url):
host = support.match(url, patron=r'<h2[^>]+><a href="([^"]+)').match.rstrip('/') host = support.match(url, patron=r'<h2[^>]+><a href="([^"]+)').match.rstrip('/')
permUrl = httptools.downloadpage(host, follow_redirects=False, only_headers=True).headers
if 'location' in permUrl.keys(): # handle redirection
return permUrl['location']
return host return host
host = config.get_channel_url(findhost) host = config.get_channel_url(findhost)
headers = [['Referer', host]] headers = [['Referer', host]]
@support.menu @support.menu
def mainlist(item): def mainlist(item):
menu = [('Film',['/category/film/', 'peliculas', '', 'movie']),
('Film al cinema {submenu}',['/category/ora-al-cinema/', 'peliculas', '', 'movie']), film = ['/category/film/',
('Generi',['', 'genres', '', 'undefined']), ('Al Cinema', ['/al-cinema/', 'peliculas']),
('Saghe',['', 'genres', 'saghe', 'undefined']), ('Generi', ['', 'genres']),
('Serie TV',['/category/serie-tv/', 'peliculas', '', 'tvshow']), # ('Sub-ITA', ['/sub-ita/', 'peliculas'])
#('Aggiornamenti Serie TV', ['/aggiornamenti-serie-tv/', 'peliculas']) da fixare
] ]
tvshow = ['/category/serie-tv/',
('Aggiornamenti Serie TV', ['/aggiornamenti-serie-tv/', 'peliculas']),]
search = '' search = ''
return locals() return locals()
@support.scrape @support.scrape
def genres(item): def genres(item):
action = 'peliculas' action = 'peliculas'
blacklist = ['Scegli il Genere', 'Film', 'Serie Tv', 'Sub-Ita', 'Anime', "Non reperibile", 'Anime Sub-ITA', 'Prossimamente',] blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
wantSaga = True if item.args == 'saghe' else False patronMenu = r'<option value="(?P<url>[^"]+)">(?P<title>[^<]+)'
patronBlock = r'<div class=\"categories-buttons-container\"(?P<block>.*?)</div>'
if not wantSaga: # se non richiedo le sage carico le icone in automatico
patronMenu = r'<a href=\"(?P<url>https:\/\/.*?)\".*?>(?P<title>.*?)</a>'
else: # mantengo l'icona del padre
patron = r'<a href=\"(?P<url>https:\/\/.*?)\".*?>(?P<title>.*?)</a>'
def itemlistHook(itemlist): def itemlistHook(itemlist):
itl = [] itl = []
for item in itemlist: for item in itemlist:
isSaga = item.fulltitle.startswith('Saga')
if len(item.fulltitle) != 3: if len(item.fulltitle) != 3:
if (isSaga and wantSaga) or (not isSaga and not wantSaga): itl.append(item)
itl.append(item)
return itl return itl
return locals() return locals()
def search(item, text): def search(item, text):
item.url = "{}/?{}".format(host, support.urlencode({'s': text})) logger.debug(text)
item.url = "{}/search/{}/feed/rss2/".format(host, text)
item.args = 'search' item.args = 'search'
try: try:
@@ -68,54 +62,33 @@ def search(item, text):
logger.error("search except: %s" % line) logger.error("search except: %s" % line)
return [] return []
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
if not item.args == 'search': # pagination not works n = '22' if '/?s=' in item.url else '8'
if not item.nextpage: item.contentType = "undefined"
item.page = 1 action = 'check'
else: patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>'
item.page = item.nextpage if item.args == 'search':
patron = r'<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
if not item.parent_url: patronNext = r'href="([^"]+)[^>]+>Successivo'
item.parent_url = item.url
item.nextpage = item.page + 1
nextPageUrl = "{}/page/{}".format(item.parent_url, item.nextpage)
resp = httptools.downloadpage(nextPageUrl, only_headers = True)
if (resp.code > 399): # no more elements
nextPageUrl = ''
else:
action = 'check'
patron= r'<article class=\"elementor-post.*?(<img .*?src=\"(?P<thumb>[^\"]+).*?)?<h1 class=\"elementor-post__title\".*?<a href=\"(?P<url>[^\"]+)\" >\s*(?P<title>[^<]+?)\s*(\((?P<lang>Sub-[a-zA-Z]+)*\))?\s*(\[(?P<quality>[A-Z]*)\])?\s*(\((?P<year>[0-9]{4})\))?\s+<'
return locals() return locals()
@support.scrape
def episodios(item): def episodios(item):
item.quality = '' item.quality = ''
data = item.data if item.data else httptools.downloadpage(item.url).data data = item.data
itemlist = [] action='findvideos'
# debug=True
patronBlock = r'<span>\s*\w+\s*[Ss]tagione.*?(?P<lang>(?:[Ss][Uu][Bb][-]?)?[Ii][Tt][Aa])(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>'
patron = r'(?P<season>\d+)x(?P<episode>\d+)[^>]+>(?P<data>.*?)(?:</table)'
return locals()
for it in support.match(data, patron=[r'div class=\"single-season.*?(?P<id>season_[0-9]+).*?>Stagione:\s(?P<season>[0-9]+).*?(\s-\s(?P<lang>[a-zA-z]+?))?<']).matches:
block = support.match(data, patron = r'div id=\"'+ it[0] +'\".*?</div').match
for ep in support.match(block, patron=[r'<li><a href=\"(?P<url>[^\"]+).*?img\" src=\"(?P<thumb>[^\"]+).*?title\">(?P<episode>[0-9]+)\.\s+(?P<title>.*?)</span>']).matches:
itemlist.append(item.clone(contentType = 'episode',
action='findvideos',
thumb = ep[1],
title = support.format_longtitle(support.cleantitle(ep[3]), season = it[1], episode = ep[2], lang= it[3]),
url = ep[0], data = '')
)
support.check_trakt(itemlist)
support.videolibrary(itemlist, item)
if (config.get_setting('downloadenabled')):
support.download(itemlist, item)
return itemlist
def check(item): def check(item):
item.data = httptools.downloadpage(item.url).data item.data = httptools.downloadpage(item.url).data
if 'season-details' in item.data.lower(): if 'Stagione' in item.data:
item.contentType = 'tvshow' item.contentType = 'tvshow'
return episodios(item) return episodios(item)
else: else:
@@ -123,14 +96,7 @@ def check(item):
def findvideos(item): def findvideos(item):
video_url = item.url logger.debug()
if item.contentType == 'movie' and isinstance(item.data, str):
if item.contentType == 'movie': item.data = support.match(item.data, patron=r'data-id="([^"]+)').matches
video_url = support.match(item, patron=[r'<div class="video-wrapper">.*?<iframe src=\"(https://.*?)\"', return support.server(item, item.data)
r'window.open\(\'([^\']+).*?_blank']).match
if (video_url == ''):
return []
itemlist = [item.clone(action="play", url=srv) for srv in support.match(video_url, patron='<div class="megaButton" meta-type="v" meta-link="([^"]+).*?(?=>)>').matches]
itemlist = support.server(item,itemlist=itemlist)
return itemlist

0
channels/altadefinizione01.json Executable file → Normal file
View File

14
channels/altadefinizione01.py Executable file → Normal file
View File

@@ -141,17 +141,13 @@ def newest(categoria):
return itemlist return itemlist
def findvideos(item): def findvideos(item):
support.info('findvideos', item) support.info('findvideos', item)
data = httptools.downloadpage(item.url).data data = httptools.downloadpage(item.url).data
iframe = support.match(data, patron='src="(http[^"]+)" frameborder=\"0\" allow=\"accelerometer; autoplay;').match iframe = support.match(data, patron='src="(http[^"]+)" frameborder').match
if iframe: if iframe:
item.url = iframe item.url = iframe
return support.server(item) return support.server(item)
else:
# TODO: verificare se si puo' reinsierire il trailer youtube itemlist = [item.clone(action="play", url=srv[0], quality=srv[1]) for srv in support.match(item, patron='<a href="#" data-link="([^"]+).*?<span class="d">([^<]+)').matches]
#itemlist = [item.clone(action="play", url=srv[0], quality=srv[1]) for srv in support.match(item, patron='<a href="#" data-link="([^"]+).*?<span class="d">([^<]+)').matches] return support.server(item, itemlist=itemlist, headers=headers)
#itemlist = support.server(item, itemlist=itemlist, headers=headers)
#return itemlist

0
channels/altadefinizioneclick.json Executable file → Normal file
View File

0
channels/altadefinizioneclick.py Executable file → Normal file
View File

0
channels/altadefinizionecommunity.json Executable file → Normal file
View File

0
channels/altadefinizionecommunity.py Executable file → Normal file
View File

2
channels/animealtadefinizione.json Executable file → Normal file
View File

@@ -1,7 +1,7 @@
{ {
"id": "animealtadefinizione", "id": "animealtadefinizione",
"name": "AnimealtAdefinizione", "name": "AnimealtAdefinizione",
"active": false, "active": true,
"language": ["ita", "sub-ita"], "language": ["ita", "sub-ita"],
"thumbnail": "animealtadefinizione.png", "thumbnail": "animealtadefinizione.png",
"banner": "animealtadefinizione.png", "banner": "animealtadefinizione.png",

0
channels/animealtadefinizione.py Executable file → Normal file
View File

2
channels/animeforce.json Executable file → Normal file
View File

@@ -2,7 +2,7 @@
"id": "animeforce", "id": "animeforce",
"name": "AnimeForce", "name": "AnimeForce",
"language": ["ita"], "language": ["ita"],
"active": false, "active": true,
"thumbnail": "animeforce.png", "thumbnail": "animeforce.png",
"banner": "animeforce.png", "banner": "animeforce.png",
"categories": ["anime"], "categories": ["anime"],

0
channels/animeforce.py Executable file → Normal file
View File

0
channels/animesaturn.json Executable file → Normal file
View File

5
channels/animesaturn.py Executable file → Normal file
View File

@@ -3,7 +3,10 @@
# Canale per AnimeSaturn # Canale per AnimeSaturn
# ---------------------------------------------------------- # ----------------------------------------------------------
from lib import js2py
from core import support from core import support
from platformcode import config
from platformcode.logger import debug
host = support.config.get_channel_url() host = support.config.get_channel_url()
__channel__ = 'animesaturn' __channel__ = 'animesaturn'
@@ -143,7 +146,7 @@ def peliculas(item):
return itemlist return itemlist
else: else:
# pagination = '' pagination = ''
if item.args == 'incorso': if item.args == 'incorso':
patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-za-z-]+)\))?</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<' patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-za-z-]+)\))?</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<'
else: else:

0
channels/animeunity.json Executable file → Normal file
View File

110
channels/animeunity.py Executable file → Normal file
View File

@@ -4,13 +4,14 @@
# ------------------------------------------------------------ # ------------------------------------------------------------
import cloudscraper, json, copy, inspect import cloudscraper, json, copy, inspect
from core import jsontools, support, httptools, scrapertools from core import support
from platformcode import autorenumber from platformcode import autorenumber, logger
session = cloudscraper.create_scraper()
# support.dbg()
host = support.config.get_channel_url() host = support.config.get_channel_url()
response = httptools.downloadpage(host + '/archivio') response = session.get(host + '/archivio')
csrf_token = support.match(response.data, patron='name="csrf-token" content="([^"]+)"').match csrf_token = support.match(response.text, patron='name="csrf-token" content="([^"]+)"').match
headers = {'content-type': 'application/json;charset=UTF-8', headers = {'content-type': 'application/json;charset=UTF-8',
'x-csrf-token': csrf_token, 'x-csrf-token': csrf_token,
'Cookie' : '; '.join([x.name + '=' + x.value for x in response.cookies])} 'Cookie' : '; '.join([x.name + '=' + x.value for x in response.cookies])}
@@ -53,7 +54,7 @@ def genres(item):
# support.dbg() # support.dbg()
itemlist = [] itemlist = []
genres = json.loads(support.match(response.data, patron='genres="([^"]+)').match.replace('&quot;','"')) genres = json.loads(support.match(response.text, patron='genres="([^"]+)').match.replace('&quot;','"'))
for genre in genres: for genre in genres:
item.args['genres'] = [genre] item.args['genres'] = [genre]
@@ -65,10 +66,10 @@ def years(item):
itemlist = [] itemlist = []
from datetime import datetime from datetime import datetime
next_year = datetime.today().year + 1 current_year = datetime.today().year
oldest_year = int(support.match(response.data, patron='anime_oldest_date="([^"]+)').match) oldest_year = int(support.match(response.text, patron='anime_oldest_date="([^"]+)').match)
for year in list(reversed(range(oldest_year, next_year + 1))): for year in list(reversed(range(oldest_year, current_year + 1))):
item.args['year']=year item.args['year']=year
itemlist.append(item.clone(title=support.typo(year,'bold'), action='peliculas')) itemlist.append(item.clone(title=support.typo(year,'bold'), action='peliculas'))
return itemlist return itemlist
@@ -116,34 +117,23 @@ def news(item):
support.info() support.info()
item.contentType = 'episode' item.contentType = 'episode'
itemlist = [] itemlist = []
import cloudscraper
session = cloudscraper.create_scraper()
fullJs = json.loads(support.match(httptools.downloadpage(item.url).data, headers=headers, patron=r'items-json="([^"]+)"').match.replace('&quot;','"')) fullJs = json.loads(support.match(session.get(item.url).text, headers=headers, patron=r'items-json="([^"]+)"').match.replace('&quot;','"'))
js = fullJs['data'] js = fullJs['data']
for it in js: for it in js:
if it.get('anime', {}).get('title') or it.get('anime', {}).get('title_eng'): itemlist.append(
title_name = it['anime']['title'] if it.get('anime', {}).get('title') else it['anime']['title_eng'] item.clone(title= support.typo(it['anime']['title'] + ' - EP. ' + it['number'], 'bold'),
pattern = r'[sS](?P<season>\d+)[eE](?P<episode>\d+)' fulltitle=it['anime']['title'],
match = scrapertools.find_single_match(it['file_name'], pattern) thumbnail=it['anime']['imageurl'],
full_episode = '' forcethumb = True,
if match: scws_id=it.get('scws_id', ''),
season, episode = match video_url=it.get('link', ''),
full_episode = ' - S' + season + ' E' + episode plot=it['anime']['plot'],
else: action='findvideos')
pattern = r'[._\s]Ep[._\s]*(?P<episode>\d+)' )
episode = scrapertools.find_single_match(it['file_name'], pattern)
if episode:
full_episode = ' - E' + episode
itemlist.append(
item.clone(title = support.typo(title_name + full_episode, 'bold'),
fulltitle = it['anime']['title'],
thumbnail = it['anime']['imageurl'],
forcethumb = True,
scws_id = it.get('scws_id', ''),
url = '{}/anime/{}-{}'.format(item.url, it['anime']['id'],it['anime']['slug']),
plot = it['anime']['plot'],
action = 'findvideos')
)
if 'next_page_url' in fullJs: if 'next_page_url' in fullJs:
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'),thumbnail=support.thumb(), url=fullJs['next_page_url'])) itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'),thumbnail=support.thumb(), url=fullJs['next_page_url']))
return itemlist return itemlist
@@ -162,27 +152,21 @@ def peliculas(item):
item.args['order'] = order_list[order] item.args['order'] = order_list[order]
payload = json.dumps(item.args) payload = json.dumps(item.args)
records = httptools.downloadpage(host + '/archivio/get-animes', headers=headers, post=payload).json['records'] records = session.post(host + '/archivio/get-animes', headers=headers, data=payload).json()['records']
# support.dbg()
for it in records: for it in records:
if not it['title']:
it['title'] = ''
lang = support.match(it['title'], patron=r'\(([It][Tt][Aa])\)').match lang = support.match(it['title'], patron=r'\(([It][Tt][Aa])\)').match
title = support.re.sub(r'\s*\([^\)]+\)', '', it['title']) title = support.re.sub(r'\s*\([^\)]+\)', '', it['title'])
if 'ita' in lang.lower(): language = 'ITA' if 'ita' in lang.lower(): language = 'ITA'
else: language = 'Sub-ITA' else: language = 'Sub-ITA'
if title: itm = item.clone(title=support.typo(title,'bold') + support.typo(language,'_ [] color kod') + (support.typo(it['title_eng'],'_ ()') if it['title_eng'] else ''))
itm = item.clone(title=support.typo(title,'bold') + support.typo(language,'_ [] color kod') + (support.typo(it['title_eng'],'_ ()') if it['title_eng'] else ''))
else:
itm = item.clone(title=support.typo(it['title_eng'],'bold') + support.typo(language,'_ [] color kod'))
itm.contentLanguage = language itm.contentLanguage = language
itm.type = it['type'] itm.type = it['type']
itm.thumbnail = it['imageurl'] itm.thumbnail = it['imageurl']
itm.plot = it['plot'] itm.plot = it['plot']
itm.url = '{}/anime/{}-{}'.format(item.url, it.get('id'), it.get('slug')) itm.url = item.url
if it['episodes_count'] == 1: if it['episodes_count'] == 1:
itm.contentType = 'movie' itm.contentType = 'movie'
@@ -190,7 +174,7 @@ def peliculas(item):
itm.contentSerieName = '' itm.contentSerieName = ''
itm.action = 'findvideos' itm.action = 'findvideos'
itm.scws_id = it['episodes'][0].get('scws_id', '') itm.scws_id = it['episodes'][0].get('scws_id', '')
# itm.video_url = it['episodes'][0].get('link', '') itm.video_url = it['episodes'][0].get('link', '')
else: else:
itm.contentType = 'tvshow' itm.contentType = 'tvshow'
@@ -210,10 +194,11 @@ def peliculas(item):
def episodios(item): def episodios(item):
support.info() support.info()
itemlist = [] itemlist = []
title = 'Parte' if item.type.lower() == 'movie' else 'Episodio' title = 'Parte ' if item.type.lower() == 'movie' else 'Episodio '
for it in item.episodes: for it in item.episodes:
itemlist.append( itemlist.append(
item.clone(title=support.typo('{}. {} {}'.format(it['number'], title, it['number']), 'bold'), item.clone(title=support.typo(title + it['number'], 'bold'),
episode = it['number'], episode = it['number'],
fulltitle=item.title, fulltitle=item.title,
show=item.title, show=item.title,
@@ -223,10 +208,8 @@ def episodios(item):
plot=item.plot, plot=item.plot,
action='findvideos', action='findvideos',
contentType='episode', contentType='episode',
url = '{}/{}'.format(item.url, it['id']) scws_id=it.get('scws_id', ''),
) video_url=it.get('link', '')))
# video_url=it.get('link', ''))
)
if inspect.stack(0)[1][3] not in ['find_episodes']: if inspect.stack(0)[1][3] not in ['find_episodes']:
autorenumber.start(itemlist, item) autorenumber.start(itemlist, item)
@@ -236,33 +219,6 @@ def episodios(item):
def findvideos(item): def findvideos(item):
# if item.scws_id: itemlist = [item.clone(title=support.config.get_localized_string(30137), server='streamingcommunityws', url=str(item.scws_id))]
# from time import time
# from base64 import b64encode
# from hashlib import md5
#
# client_ip = support.httptools.downloadpage('http://ip-api.com/json/').json.get('query')
#
# expires = int(time() + 172800)
# token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
#
# url = 'https://scws.work/master/{}?token={}&expires={}&n=1'.format(item.scws_id, token, expires)
#
# itemlist = [item.clone(title=support.config.get_localized_string(30137), url=url, server='directo', action='play')]
from core import channeltools
itemlist = [item.clone(title=channeltools.get_channel_parameters(item.channel)['title'],
url=item.url, server='streamingcommunityws')]
return support.server(item, itemlist=itemlist, referer=False) return support.server(item, itemlist=itemlist, referer=False)
# return support.server(item, itemlist=itemlist)
#
# def play(item):
# urls = list()
# info = support.match(item.url, patron=r'(http.*?rendition=(\d+)[^\s]+)').matches
#
# if info:
# for url, res in info:
# urls.append(['hls [{}]'.format(res), url])
# return urls

4
channels/animeuniverse.json Executable file → Normal file
View File

@@ -1,7 +1,7 @@
{ {
"id": "animeuniverse", "id": "animeuniverse",
"name": "AnimeHDitalia", "name": "AnimeUniverse",
"active": false, "active": true,
"language": ["ita", "sub-ita"], "language": ["ita", "sub-ita"],
"thumbnail": "animeuniverse.png", "thumbnail": "animeuniverse.png",
"banner": "animeuniverse.png", "banner": "animeuniverse.png",

3
channels/animeuniverse.py Executable file → Normal file
View File

@@ -10,7 +10,7 @@ headers = {}
perpage_list = ['20','30','40','50','60','70','80','90','100'] perpage_list = ['20','30','40','50','60','70','80','90','100']
perpage = perpage_list[support.config.get_setting('perpage' , 'animeuniverse')] perpage = perpage_list[support.config.get_setting('perpage' , 'animeuniverse')]
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img [^>]+Streaming' epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
@support.menu @support.menu
@@ -103,7 +103,6 @@ def episodios(item):
anime = True anime = True
pagination = int(perpage) pagination = int(perpage)
patron = epPatron patron = epPatron
# debug = True
return locals() return locals()

9
channels/animeworld.json Executable file → Normal file
View File

@@ -7,15 +7,6 @@
"banner": "animeworld.png", "banner": "animeworld.png",
"categories": ["anime", "vos"], "categories": ["anime", "vos"],
"settings": [ "settings": [
{
"id": "lang",
"type": "list",
"label": "Lingua di Ricerca",
"default": 0,
"enabled": true,
"visible": true,
"lvalues": [ "Tutte", "Ita", "Sub-Ita"]
},
{ {
"id": "order", "id": "order",
"type": "list", "type": "list",

29
channels/animeworld.py Executable file → Normal file
View File

@@ -4,7 +4,7 @@
# thanks to fatshotty # thanks to fatshotty
# ---------------------------------------------------------- # ----------------------------------------------------------
from core import httptools, support, config, jsontools from core import httptools, support, jsontools
host = support.config.get_channel_url() host = support.config.get_channel_url()
__channel__ = 'animeworld' __channel__ = 'animeworld'
@@ -23,7 +23,7 @@ def get_data(item):
# support.dbg() # support.dbg()
url = httptools.downloadpage(item.url, headers=headers, follow_redirects=True, only_headers=True).url url = httptools.downloadpage(item.url, headers=headers, follow_redirects=True, only_headers=True).url
data = support.match(url, headers=headers, follow_redirects=True).data data = support.match(url, headers=headers, follow_redirects=True).data
if 'SecurityAW' in data: if 'AWCookieVerify' in data:
get_cookie(data) get_cookie(data)
data = get_data(item) data = get_data(item)
return data return data
@@ -37,8 +37,8 @@ def order():
@support.menu @support.menu
def mainlist(item): def mainlist(item):
anime=['/filter?sort=', anime=['/filter?sort=',
('ITA',['/filter?dub=1&sort=', 'menu', 'dub=1']), ('ITA',['/filter?dub=1&sort=', 'menu', '1']),
('SUB-ITA',['/filter?dub=0&sort=', 'menu', 'dub=0']), ('SUB-ITA',['/filter?dub=0&sort=', 'menu', '0']),
('In Corso', ['/ongoing', 'peliculas','noorder']), ('In Corso', ['/ongoing', 'peliculas','noorder']),
('Ultimi Episodi', ['/updated', 'peliculas', 'updated']), ('Ultimi Episodi', ['/updated', 'peliculas', 'updated']),
('Nuove Aggiunte',['/newest', 'peliculas','noorder' ]), ('Nuove Aggiunte',['/newest', 'peliculas','noorder' ]),
@@ -50,7 +50,6 @@ def mainlist(item):
def genres(item): def genres(item):
action = 'peliculas' action = 'peliculas'
data = get_data(item) data = get_data(item)
patronBlock = r'dropdown[^>]*>\s*Generi\s*<span.[^>]+>(?P<block>.*?)</ul>' patronBlock = r'dropdown[^>]*>\s*Generi\s*<span.[^>]+>(?P<block>.*?)</ul>'
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)</label>' patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)</label>'
@@ -76,10 +75,9 @@ def menu(item):
def submenu(item): def submenu(item):
action = 'peliculas' action = 'peliculas'
data = item.other data = item.other
# debug=True
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>' patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>'
def itemHook(item): def itemHook(item):
item.url = '{}/filter?{}={}&{}{}'.format(host, item.name, item.value, item.args, ('&sort=' if item.name != 'sort' else '')) item.url = host + '/filter?' + item.name + '=' + item.value + '&dub=' + item.args + ('&sort=' if item.name != 'sort' else '')
return item return item
return locals() return locals()
@@ -87,10 +85,9 @@ def submenu(item):
def newest(categoria): def newest(categoria):
support.info(categoria) support.info(categoria)
item = support.Item() item = support.Item()
lang = config.get_setting('lang', channel=item.channel)
try: try:
if categoria == "anime": if categoria == "anime":
item.url = host item.url = host + '/updated'
item.args = "updated" item.args = "updated"
return peliculas(item) return peliculas(item)
# Continua la ricerca in caso di errore # Continua la ricerca in caso di errore
@@ -101,13 +98,13 @@ def newest(categoria):
return [] return []
def search(item, text): def search(item, texto):
support.info(text) support.info(texto)
if item.search: if item.search:
item.url = '{}/filter?{}&keyword={}&sort='.format(host, item.args, text) item.url = host + '/filter?dub=' + item.args + '&keyword=' + texto + '&sort='
else: else:
lang = ['?', '?dub=1&', '?dub=0&'][config.get_setting('lang', channel=item.channel)] item.args = 'noorder'
item.url = '{}/filter{}&keyword={}&sort='.format(host, lang, text) item.url = host + '/search?keyword=' + texto
item.contentType = 'tvshow' item.contentType = 'tvshow'
try: try:
return peliculas(item) return peliculas(item)
@@ -121,8 +118,8 @@ def search(item, text):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
data = get_data(item)
anime = True anime = True
# debug = True
if item.args not in ['noorder', 'updated'] and not item.url[-1].isdigit(): item.url += order() # usa l'ordinamento di configura canale if item.args not in ['noorder', 'updated'] and not item.url[-1].isdigit(): item.url += order() # usa l'ordinamento di configura canale
data = get_data(item) data = get_data(item)
@@ -188,9 +185,7 @@ def findvideos(item):
else: else:
dataJson = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).data dataJson = support.match(host + '/api/episode/info?id=' + epID + '&alt=0', headers=headers).data
json = jsontools.load(dataJson) json = jsontools.load(dataJson)
title = support.match(json['grabber'], patron=r'server\d+.([^.]+)', string=True).match title = support.match(json['grabber'], patron=r'server\d+.([^.]+)', string=True).match
if title: itemlist.append(item.clone(action="play", title=title, url=json['grabber'].split('=')[-1], server='directo')) if title: itemlist.append(item.clone(action="play", title=title, url=json['grabber'].split('=')[-1], server='directo'))
else: urls.append(json['grabber']) else: urls.append(json['grabber'])
# support.info(urls)
return support.server(item, urls, itemlist) return support.server(item, urls, itemlist)

4
channels/aniplay.json Executable file → Normal file
View File

@@ -1,7 +1,7 @@
{ {
"id": "aniplay", "id": "aniplay",
"name": "AniPlay", "name": "AniPlay",
"active": false, "active": true,
"language": ["ita", "sub-ita"], "language": ["ita", "sub-ita"],
"thumbnail": "aniplay.png", "thumbnail": "aniplay.png",
"banner": "aniplay.png", "banner": "aniplay.png",
@@ -34,4 +34,4 @@
"lvalues": ["10", "20", "30", "40", "50", "60", "80", "90"] "lvalues": ["10", "20", "30", "40", "50", "60", "80", "90"]
} }
] ]
} }

70
channels/aniplay.py Executable file → Normal file
View File

@@ -1,5 +1,5 @@
from platformcode import config, logger, autorenumber from platformcode import config, logger, autorenumber
from core import httptools, scrapertools, support, tmdb, jsontools from core import httptools, scrapertools, support, tmdb
from inspect import stack from inspect import stack
import sys import sys
@@ -34,7 +34,6 @@ def submenu_az(item):
thumbnail=support.thumb('az'))) thumbnail=support.thumb('az')))
return itemlist return itemlist
def submenu_year(item): def submenu_year(item):
itemlist = [] itemlist = []
from datetime import date from datetime import date
@@ -47,7 +46,6 @@ def submenu_year(item):
thumbnail=support.thumb('year'))) thumbnail=support.thumb('year')))
return itemlist return itemlist
def submenu_top(item): def submenu_top(item):
itemlist = [] itemlist = []
links = {'Top del giorno':'daily-top', 'Top della settimana':'weekly-top', 'Top del mese':'monthly-top'} links = {'Top del giorno':'daily-top', 'Top della settimana':'weekly-top', 'Top del mese':'monthly-top'}
@@ -58,7 +56,6 @@ def submenu_top(item):
variable= link)) variable= link))
return itemlist return itemlist
def submenu_season(item): def submenu_season(item):
itemlist = [] itemlist = []
seasons = {'winter':'Inverno', 'spring':'Primavera', 'summer':'Estate', 'fall':'Autunno'} seasons = {'winter':'Inverno', 'spring':'Primavera', 'summer':'Estate', 'fall':'Autunno'}
@@ -68,13 +65,12 @@ def submenu_season(item):
s = season['season'].split('.')[-1] s = season['season'].split('.')[-1]
title = seasons[s] title = seasons[s]
itemlist.append(item.clone(title=title, itemlist.append(item.clone(title=title,
url = '{}/api/seasonal-view/{}-{}'.format(host, s, item.variable), url = '{}/api/seasonal-view/{}-{}'.format(host, s, item.variable),
thumbnail = support.thumb(s), thumbnail = support.thumb(s),
action = 'peliculas', action = 'peliculas',
variable='')) variable=''))
return itemlist return itemlist
def submenu_top_of(item): def submenu_top_of(item):
itemlist = [] itemlist = []
url= '{}/api/home/{}'.format(host, item.variable) url= '{}/api/home/{}'.format(host, item.variable)
@@ -87,14 +83,15 @@ def submenu_top_of(item):
long_title = support.typo(title, 'bold') + support.typo(lang, '_ [] color kod') long_title = support.typo(title, 'bold') + support.typo(lang, '_ [] color kod')
itemlist.append(item.clone(title=long_title, itemlist.append(item.clone(title=long_title,
url = '{}/anime/{}'.format(host, anime['animeId']), id=anime['animeId'],
video_url = '{}/api/anime/{}'.format(host, anime['animeId']), url = '{}/api/anime/{}'.format(host, anime['animeId']),
thumbnail = get_thumbnail(anime, 'animeHorizontalImages'), thumbnail = get_thumbnail(anime, 'animeHorizontalImages'),
action = 'episodios', action = 'episodios',
variable=anime['animeId'])) variable=anime['animeId']))
return itemlist return itemlist
def search(item, texto): def search(item, texto):
support.info(texto) support.info(texto)
item.url = host + '/api/anime/advanced-search' item.url = host + '/api/anime/advanced-search'
@@ -139,14 +136,15 @@ def latest_added(item):
itemlist.append(item.clone(title=long_title, itemlist.append(item.clone(title=long_title,
fulltitle=title, fulltitle=title,
url='{}/play/{}'.format(host, episode['id']), animeId = episode['animeId'],
id=episode['id'],
contentType = 'episode', contentType = 'episode',
contentTitle = title, contentTitle = title,
contentSerieName = animeTitle, contentSerieName = animeTitle,
contentLanguage = lang, contentLanguage = lang,
quality = quality, quality = quality,
contentEpisodeNumber = int(float(episode['episodeNumber'])), contentEpisodeNumber = int(float(episode['episodeNumber'])),
video_url = '{}/api/episode/{}'.format(host, episode['id']), animeUrl = '{}/api/anime/{}'.format(host, episode['animeId']),
thumbnail = image, thumbnail = image,
fanart = image, fanart = image,
action = 'findvideos')) action = 'findvideos'))
@@ -165,7 +163,6 @@ def peliculas(item):
js = httptools.downloadpage('{}?page={}&size={}{}&sort={},{}&sort=id'.format(item.url, page, perpage, item.variable, sort, order)).json js = httptools.downloadpage('{}?page={}&size={}{}&sort={},{}&sort=id'.format(item.url, page, perpage, item.variable, sort, order)).json
for it in js: for it in js:
logger.debug(jsontools.dump(js))
title, lang = get_lang(it['title']) title, lang = get_lang(it['title'])
long_title = support.typo(title, 'bold') + support.typo(lang, '_ [] color kod') long_title = support.typo(title, 'bold') + support.typo(lang, '_ [] color kod')
@@ -177,10 +174,10 @@ def peliculas(item):
contentType = 'movie' if it['type'] == 'Movie' else 'tvshow', contentType = 'movie' if it['type'] == 'Movie' else 'tvshow',
contentTitle = title, contentTitle = title,
contentSerieName = title if it['type'] == 'Serie' else '', contentSerieName = title if it['type'] == 'Serie' else '',
action ='findvideos' if it['type'] == 'Movie' else 'episodios', action ='findvideos' if it['type'] == 'Movie' else 'episodios',# '' if not active else 'findvideos' if it['type'] == 'Movie' else 'episodios',
plot = it['storyline'], plot = it['storyline'],
url = '{}/anime/{}'.format(host, it['id']), # year = it['startDate'].split('-')[0],
video_url = '{}/api/anime/{}'.format(host, it.get('animeId', it.get('id'))), url = '{}/api/anime/{}'.format(host, it['id']),
thumbnail = get_thumbnail(it), thumbnail = get_thumbnail(it),
fanart = get_thumbnail(it, 'horizontalImages'))) fanart = get_thumbnail(it, 'horizontalImages')))
@@ -195,10 +192,9 @@ def peliculas(item):
def episodios(item): def episodios(item):
logger.debug() logger.debug()
itemlist = [] itemlist = []
if not item.video_url:
item.video_url = item.url.replace('/anime/', '/api/anime/')
# url = '{}/api/anime/{}'.format(host, item.id) # url = '{}/api/anime/{}'.format(host, item.id)
json = httptools.downloadpage(item.video_url, CF=False ).json json = httptools.downloadpage(item.url, CF=False ).json
if type(json) == list: if type(json) == list:
item.show_renumber = False item.show_renumber = False
@@ -212,7 +208,7 @@ def episodios(item):
title = it['name'] title = it['name']
itemlist.append(item.clone(title = title, itemlist.append(item.clone(title = title,
video_url = '{}/api/anime/{}/season/{}'.format(host, it['animeId'], it['id']), id= '{}/season/{}'.format(it['animeId'], it['id']),
contentType = 'season', contentType = 'season',
action = 'list_episodes', action = 'list_episodes',
plot = json['storyline'], plot = json['storyline'],
@@ -249,7 +245,8 @@ def list_episodes(item, json=None):
itemlist = [] itemlist = []
if not json: if not json:
json = httptools.downloadpage(item.video_url, CF=False ).json url = '{}/api/anime/{}'.format(host, item.id)
json = httptools.downloadpage(url, CF=False ).json
episodes = json['episodes'] if 'episodes' in json else json episodes = json['episodes'] if 'episodes' in json else json
episodes.sort(key=lambda ep: int(ep['episodeNumber'].split('.')[0])) episodes.sort(key=lambda ep: int(ep['episodeNumber'].split('.')[0]))
@@ -266,8 +263,8 @@ def list_episodes(item, json=None):
image = get_thumbnail(it, 'episodeImages') image = get_thumbnail(it, 'episodeImages')
itemlist.append(item.clone(title = title, itemlist.append(item.clone(title = title,
url= '{}/play/{}'.format(host, it['id']), id= it['id'],
video_url= '{}/api/episode/{}'.format(host, it['id']), url= 'api/episode/{}'.format(it['id']),
contentType = 'episode', contentType = 'episode',
contentEpisodeNumber = int(it['episodeNumber'].split('.')[0]), contentEpisodeNumber = int(it['episodeNumber'].split('.')[0]),
contentSeason = item.contentSeason if item.contentSeason else '', contentSeason = item.contentSeason if item.contentSeason else '',
@@ -286,18 +283,21 @@ def list_episodes(item, json=None):
def findvideos(item): def findvideos(item):
logger.debug() logger.debug()
res = httptools.downloadpage(item.video_url, CF=False ).json url = '{}/api/{}/{}'.format(host, 'episode' if item.contentType == 'episode' else 'anime', item.id)
if res.get('episodes', []): json = httptools.downloadpage(url, CF=False ).json
res = httptools.downloadpage('{}/api/episode/{}'.format(host, res['episodes'][0]['id'])).json
item.url = res['videoUrl'] if json.get('episodes', []):
item.server = 'directo' json = httptools.downloadpage('{}/api/episode/{}'.format(host, json['episodes'][0]['id'])).json
# logger.debug(json)
if '.m3u' in item.url: videourl = json['videoUrl']
item.manifest = 'hls'
return support.server(item, itemlist=[item]) itemlist = [item.clone(title=config.get_localized_string(30137),
url=videourl,
server='directo')]
return support.server(item, itemlist=itemlist)
def get_thumbnail(data, prop = 'verticalImages', key = 'full'): def get_thumbnail(data, prop = 'verticalImages', key = 'full'):

2
channels/casacinema.json Executable file → Normal file
View File

@@ -2,7 +2,7 @@
"id": "casacinema", "id": "casacinema",
"name": "Casacinema", "name": "Casacinema",
"language": ["ita", "sub-ita"], "language": ["ita", "sub-ita"],
"active": false, "active": true,
"thumbnail": "casacinema.png", "thumbnail": "casacinema.png",
"banner": "casacinema.png", "banner": "casacinema.png",
"categories": ["tvshow", "movie","vos"], "categories": ["tvshow", "movie","vos"],

33
channels/casacinema.py Executable file → Normal file
View File

@@ -36,20 +36,20 @@ def genres(item):
def check(item): def check(item):
item.data = support.match(item).data item.data = support.match(item).data
if 'episodi e stagioni' in item.data.lower(): if 'continua con il video' in item.data.lower():
support.info('select = ### è una serie ###')
item.contentType = 'tvshow'
return episodios(item)
else:
support.info('select = ### è un film ###') support.info('select = ### è un film ###')
item.contentType = 'movie' item.contentType = 'movie'
return findvideos(item) return findvideos(item)
else:
support.info('select = ### è una serie ###')
item.contentType = 'tvshow'
return episodios(item)
def search(item, text): def search(item, text):
support.info(text) support.info(text)
text = text.replace(' ', '+') text = text.replace(' ', '+')
item.url = host + '/?a=b&s=' + text item.url = host + '/?s=' + text
item.args = 'search' item.args = 'search'
try: try:
return peliculas(item) return peliculas(item)
@@ -93,6 +93,7 @@ def newest(categoria):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
# debug = True
if item.contentType == 'movie': if item.contentType == 'movie':
action = 'findvideos' action = 'findvideos'
elif item.contentType == 'tvshow': elif item.contentType == 'tvshow':
@@ -104,10 +105,11 @@ def peliculas(item):
if item.args == 'newest': if item.args == 'newest':
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>[sS]ub-[iI][tT][aA])?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?' patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>[sS]ub-[iI][tT][aA])?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
else: else:
# patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?\s?(?:[\(\[])?(?P<lang>[sS]ub-[iI][tT][aA])?(?:[\)\]])?\s?(?:\[(?P<quality>.+?)\])?\s?(?:\((?P<year>\d+)\))?<'
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?P<title2>\([\D*]+\))?(?:\[(?P<quality1>HD)\])?\s?(?:[\(\[])?(?P<lang>[sS]ub-[iI][tT][aA])?(?:[\)\]])?\s?(?:\[(?P<quality>.+?)\])?\s?(?:\((?P<year>\d+)\))?(?:\(\D{2}\s\d{4}\))?<' patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?P<title2>\([\D*]+\))?(?:\[(?P<quality1>HD)\])?\s?(?:[\(\[])?(?P<lang>[sS]ub-[iI][tT][aA])?(?:[\)\]])?\s?(?:\[(?P<quality>.+?)\])?\s?(?:\((?P<year>\d+)\))?(?:\(\D{2}\s\d{4}\))?<'
patronNext = r'<a href="([^"]+)"\s*>Pagina' patronNext = r'<a href="([^"]+)"\s*>Pagina'
# debug = True
def itemHook(item): def itemHook(item):
if item.quality1: if item.quality1:
@@ -118,7 +120,8 @@ def peliculas(item):
item.title += support.typo(item.lang2, '_ [] color kod') item.title += support.typo(item.lang2, '_ [] color kod')
if item.args == 'novita': if item.args == 'novita':
item.title = item.title item.title = item.title
# if 'wp-content' in item.thumbnail and not item.infoLabels['year']:
# item.infoLabels['year'] = item.thumbnail.split('/')[5]
return item return item
return locals() return locals()
@@ -130,8 +133,11 @@ def episodios(item):
action = 'findvideos' action = 'findvideos'
item.contentType = 'tvshow' item.contentType = 'tvshow'
blacklist = [''] blacklist = ['']
# debug = True
patron = r'"season-no">(?P<season>\d+)x(?P<episode>\d+)(?:[^>]+>){5}\s*(?P<title>[^<]+)(?P<data>.*?)</table>' patron = r'"season-no">(?P<season>\d+)x(?P<episode>\d+)(?:[^>]+>){5}\s*(?P<title>[^<]+)(?P<data>.*?)</table>'
# patron = r'(?P<episode>\d+(?:&#215;|×)?\d+\-\d+|\d+(?:&#215;|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:<br />|</p>)'
patronBlock = r'<span>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?.*?</span>.*?class="content(?P<block>.*?)(?:"accordion-item|<script>)' patronBlock = r'<span>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?.*?</span>.*?class="content(?P<block>.*?)(?:"accordion-item|<script>)'
# patronBlock = r'<strong>(?P<block>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?(?:.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
return locals() return locals()
@@ -139,7 +145,10 @@ def findvideos(item):
if item.contentType != 'movie': if item.contentType != 'movie':
links = support.match(item.data, patron=r'href="([^"]+)"').matches links = support.match(item.data, patron=r'href="([^"]+)"').matches
else: else:
matchData = item.data if item.data else support.match(item.url, headers=headers).data matchData = item.data if item.data else item
links = support.match(matchData, patron=r'data-id="([^"]+)"').matches links = support.match(matchData, patron=r'(?:SRC|href)="([^"]+)"', patronBlock=r'<div class="col-md-10">(.+?)<div class="ads">').matches
data = ''
return support.server(item, links) for link in links:
support.info('URL=',link)
data += link + '\n'
return support.server(item, data)

0
channels/cb01anime.json Executable file → Normal file
View File

0
channels/cb01anime.py Executable file → Normal file
View File

0
channels/cineblog01.json Executable file → Normal file
View File

31
channels/cineblog01.py Executable file → Normal file
View File

@@ -2,6 +2,7 @@
# ------------------------------------------------------------ # ------------------------------------------------------------
# Canale per cineblog01 # Canale per cineblog01
# ------------------------------------------------------------ # ------------------------------------------------------------
import datetime
import re import re
from core import scrapertools, httptools, servertools, support from core import scrapertools, httptools, servertools, support
@@ -23,19 +24,17 @@ headers = [['Referer', host]]
def mainlist(item): def mainlist(item):
film = [ film = [
('HD', ['', 'menu', 'Film HD Streaming']), ('HD', ['', 'menu', 'Film HD Streaming']),
('Genere', ['', 'menu', 'Film per Genere']), ('Generi', ['', 'menu', 'Film per Genere']),
('Anni', ['', 'menu', 'Film per Anno']), ('Anni', ['', 'menu', 'Film per Anno']),
('Popolari per Genere', ['', 'menu', 'Film Popolari']), ('Paese', ['', 'menu', 'Film per Paese']),
('Ultimi Aggiunti', ['/ultimi-100-film-aggiunti/', 'peliculas', 'newest']), ('Ultimi Aggiornati', ['/ultimi-100-film-aggiornati/', 'peliculas', 'newest']),
('Popolari', ['/category/film-popolari/']), ('Ultimi Aggiunti', ['/lista-film-ultimi-100-film-aggiunti/', 'peliculas', 'newest'])
('Italiani', ['/category/nazione/italia/'])
# ('Film in Lista', ['/lista-film/', 'peliculas', 'newest'])
] ]
tvshow = ['/serietv/', tvshow = ['/serietv/',
('Per Lettera', ['/serietv/', 'menu', 'Serie-TV x Lettera']), ('Per Lettera', ['/serietv/', 'menu', 'Serie-Tv per Lettera']),
('Per Genere', ['/serietv/', 'menu', 'Serie-TV x Genere']), ('Per Genere', ['/serietv/', 'menu', 'Serie-Tv per Genere']),
('Per anno', ['/serietv/', 'menu', 'Serie-TV x Anno']), ('Per anno', ['/serietv/', 'menu', 'Serie-Tv per Anno']),
('Ultime Aggiunte', ['/serietv/ultime-100-serie-tv-aggiunte/', 'peliculas', 'newest']) ('Ultime Aggiornate', ['/serietv/ultime-100-serie-tv-aggiornate/', 'peliculas', 'newest'])
] ]
docu = [('Documentari {bullet bold}', ['/category/documentario/', 'peliculas']), docu = [('Documentari {bullet bold}', ['/category/documentario/', 'peliculas']),
('HD {submenu} {documentari}', ['/category/hd-alta-definizione/documentario-hd/', 'peliculas']) ('HD {submenu} {documentari}', ['/category/hd-alta-definizione/documentario-hd/', 'peliculas'])
@@ -46,9 +45,9 @@ def mainlist(item):
@support.scrape @support.scrape
def menu(item): def menu(item):
# debug = True # debug=True
patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>' patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>'
patronMenu = r'href="?(?P<url>[^">]+)"?[^>]+>(?P<title>[^<»]+)' patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>[^<»]+)'
action = 'peliculas' action = 'peliculas'
return locals() return locals()
@@ -64,7 +63,7 @@ def newest(categoria):
item.url = host + '/serietv/' # aggiornamento-quotidiano-serie-tv/' item.url = host + '/serietv/' # aggiornamento-quotidiano-serie-tv/'
else: else:
item.contentType = 'movie' item.contentType = 'movie'
item.url = host + '/ultimi-100-film-aggiunti/' item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
item.args = "newest" item.args = "newest"
return peliculas(item) return peliculas(item)
# Continua la ricerca in caso di errore # Continua la ricerca in caso di errore
@@ -93,7 +92,7 @@ def search(item, text):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
#debug = True # debug = True
# esclusione degli articoli 'di servizio' # esclusione degli articoli 'di servizio'
# curYear = datetime.date.today().year # curYear = datetime.date.today().year
# blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO &#x25b6; TROVA L&#8217;INDIRIZZO UFFICIALE ', # blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO &#x25b6; TROVA L&#8217;INDIRIZZO UFFICIALE ',
@@ -113,7 +112,7 @@ def peliculas(item):
action = 'episodios' action = 'episodios'
elif '/serietv/' not in item.url: elif '/serietv/' not in item.url:
patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&‖“]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?' patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&‖“]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
action = 'findvideos' action = 'findvideos'
else: else:
@@ -145,7 +144,7 @@ def episodios(item):
addVideolibrary = False addVideolibrary = False
downloadEnabled = False downloadEnabled = False
patron = r'<tr><td>(?P<title>[^<]+)<td><span [^>].+?><a [^>]+href="(?P<url>[^"]+)[^>]+>' patron = r'<td>(?P<title>[^<]+)<td><a [^>]+href="(?P<url>[^"]+)[^>]+>'
sceneTitle = True sceneTitle = True
# debug = True # debug = True

2
channels/cinemalibero.json Executable file → Normal file
View File

@@ -2,7 +2,7 @@
"id": "cinemalibero", "id": "cinemalibero",
"name": "Cinemalibero", "name": "Cinemalibero",
"language": ["ita"], "language": ["ita"],
"active": false, "active": true,
"thumbnail": "cinemalibero.png", "thumbnail": "cinemalibero.png",
"banner": "cinemalibero.png", "banner": "cinemalibero.png",
"categories": ["movie","tvshow","anime"], "categories": ["movie","tvshow","anime"],

74
channels/cinemalibero.py Executable file → Normal file
View File

@@ -97,11 +97,10 @@ def peliculas(item):
@support.scrape @support.scrape
def episodios(item): def episodios(item):
data = item.data data = item.data
# debug=True
if item.args == 'anime': if item.args == 'anime':
logger.debug("Anime :", item) logger.debug("Anime :", item)
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))|(?P<data>.+)' patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)' patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
item.contentType = 'tvshow' item.contentType = 'tvshow'
elif item.args == 'sport': elif item.args == 'sport':
@@ -111,6 +110,7 @@ def episodios(item):
item.contentType = 'tvshow' item.contentType = 'tvshow'
elif item.args == 'serie' or item.contentType == 'tvshow': elif item.args == 'serie' or item.contentType == 'tvshow':
logger.debug("Serie :", item) logger.debug("Serie :", item)
# debug=True
patron = r'(?:/>|<p>)\s*(?:(?P<episode>\d+(?:x|×|&#215;)\d+|Puntata \d+)(?:-(?P<episode2>\d+))?[;]?[ ]?(?P<title>[^<-]+))?(?P<data>.*?)(?:<br|</p)' patron = r'(?:/>|<p>)\s*(?:(?P<episode>\d+(?:x|×|&#215;)\d+|Puntata \d+)(?:-(?P<episode2>\d+))?[;]?[ ]?(?P<title>[^<-]+))?(?P<data>.*?)(?:<br|</p)'
patronBlock = r'Stagione\s(?:[Uu]nica)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:strong>|<div class="at-below)' patronBlock = r'Stagione\s(?:[Uu]nica)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:strong>|<div class="at-below)'
item.contentType = 'tvshow' item.contentType = 'tvshow'
@@ -130,38 +130,28 @@ def episodios(item):
for it in itl: for it in itl:
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)') ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
if not ep and 'http' in it.data: # stagione intera if not ep and 'http' in it.data: # stagione intera
# from lib import unshortenit from lib import unshortenit
# data = unshortenit.findlinks(it.data) data = unshortenit.findlinks(it.data)
episodes = {}
def get_ep(s): def get_ep(s):
srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server]) srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server])
if hasattr(srv_mod, 'get_filename'): if hasattr(srv_mod, 'get_filename'):
title = srv_mod.get_filename(s.url) title = srv_mod.get_filename(s.url)
if item.args == 'anime': ep = scrapertools.get_season_and_episode(title)
ep = title
else:
ep = scrapertools.get_season_and_episode(title)
if ep: if ep:
if ep not in episodes: if ep not in episodes:
episodes[ep] = [] episodes[ep] = []
episodes[ep].append(s) episodes[ep].append(s)
servers = support.server(item, it.data, CheckLinks=False, Download=False, Videolibrary=False) servers = support.server(item, data, CheckLinks=False, Download=False, Videolibrary=False)
# for s in servers: episodes = {}
# get_ep(s) for s in servers:
get_ep(s)
# ottengo l'episodio dal nome del file # ottengo l'episodio dal nome del file
with futures.ThreadPoolExecutor() as executor: # with futures.ThreadPoolExecutor() as executor:
for s in servers: # for s in servers:
executor.submit(get_ep, s) # executor.submit(get_ep, s)
# logger.debug(it.contentLanguage) # logger.debug(it.contentLanguage)
if item.args != 'anime': ret.extend([it.clone(title=typo(ep, 'bold')+typo(it.contentLanguage, '_ [] color kod bold'), contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
for ep in episodes:
ret.append(it.clone(title=typo(ep, 'bold') + typo(it.contentLanguage, '_ [] color kod bold'),
servers=[srv.tourl() for srv in episodes[ep]], contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1])))
else:
ret.extend([it.clone(title=typo(ep, 'bold') + typo(it.contentLanguage, '_ [] color kod bold'),
servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
elif ep: elif ep:
ret.append(it) ret.append(it)
return sorted(ret, key=lambda i: i.title) return sorted(ret, key=lambda i: i.title)
@@ -216,15 +206,16 @@ def newest(categoria):
def check(item): def check(item):
logger.debug()
data = support.match(item.url, headers=headers).data data = support.match(item.url, headers=headers).data
# support.dbg()
if data: if data:
ck = str(support.match(data, patronBlock=r'Genere:(.*?)</span>', patron=r'tag">([^<]+)').matches).lower() ck = str(support.match(data, patronBlock=r'Genere:(.*?)</span>', patron=r'tag">([^<]+)').matches).lower()
if 'serie tv' in ck or 'anime' in ck or 'wrestling wwe' in ck :# in ['serie tv', 'wrestling wwe', 'anime']: if 'serie tv' in ck or 'anime' in ck:# in ['serie tv', 'wrestling wwe', 'anime']:
if 'anime' in ck: if 'anime' in ck:
item.args = 'anime' item.args = 'anime'
elif 'sport' in ck or 'wrestling' in ck: elif 'sport' in ck:
item.args = 'sport' item.args = 'sport'
else: else:
item.args = 'serie' item.args = 'serie'
@@ -258,25 +249,26 @@ def findvideos(item):
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers]) return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
if not item.data: if not item.data:
item.data = httptools.downloadpage(item.url) item.data = httptools.downloadpage(item.url)
data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)(?:<div class="at-below-post|[dD][oO][wW][nN][lL][oO][aA][dD])') data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)<div class="at-below-post')
if data: if data:
item.data = data item.data = data
servers = [] servers = []
# if item.args == 'anime': if item.args == 'anime':
# if item.urls: # this is a episode if item.urls: # this is a episode
# return support.server(item, itemlist=[Item(url=support.unshortenit.FileCrypt().unshorten(u)) for u in item.urls]) return support.server(item, itemlist=[Item(url=support.unshortenit.FileCrypt().unshorten(u)) for u in item.urls])
# itemlist = [] itemlist = []
# episodes = {} episodes = {}
# for uri in support.unshortenit.FileCrypt().find(item.data): # support.dbg()
# for ep in support.unshortenit.FileCrypt(uri).list_files(): for uri in support.unshortenit.FileCrypt().find(item.data):
# ep = ('.'.join(ep[0].split('.')[:-1]), ep[1]) # remove extension for ep in support.unshortenit.FileCrypt(uri).list_files():
# if not ep[0] in episodes: ep = ('.'.join(ep[0].split('.')[:-1]), ep[1]) # remove extension
# episodes[ep[0]] = [] if not ep[0] in episodes:
# episodes[ep[0]].append(ep[1]) episodes[ep[0]] = []
# for ep in episodes.keys(): episodes[ep[0]].append(ep[1])
# itemlist.append(item.clone(title=ep, urls=episodes[ep], action='findvideos', data='')) for ep in episodes.keys():
# return itemlist itemlist.append(item.clone(title=ep, urls=episodes[ep], action='findvideos', data=''))
return itemlist
total_servers = support.server(item, data=item.data) total_servers = support.server(item, data=item.data)
if item.contentType == 'episode' and len(set([srv.server for srv in total_servers])) < len([srv.server for srv in total_servers]): if item.contentType == 'episode' and len(set([srv.server for srv in total_servers])) < len([srv.server for srv in total_servers]):

0
channels/cinetecadibologna.json Executable file → Normal file
View File

0
channels/cinetecadibologna.py Executable file → Normal file
View File

View File

@@ -1,11 +0,0 @@
{
"id": "dinostreaming",
"name": "DinoStreaming",
"language": ["ita"],
"active": true,
"thumbnail": "dinostreaming.png",
"banner": "dinostreaming.png",
"categories": ["movie"],
"settings": [],
"not_active": ["include_in_newest"]
}

View File

@@ -1,77 +0,0 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per Dinostreaming
# by ilmich
# ------------------------------------------------------------
from core import httptools, support
from core.item import Item
from platformcode import logger
host = support.config.get_channel_url()
headers = [['Referer', host]]
@support.menu
def mainlist(item):
film = [('Film al cinema',['/film-category/al-cinema/', 'peliculas']),
('Generi',['', 'genres']),
]
search = ''
return locals()
@support.scrape
def genres(item):
action = 'peliculas'
blacklist = ['Seguici su Telegram',]
patronMenu = r'<li class="elementor-icon-list-item">.*?href="(?P<url>.*?)".*?text">(?P<title>.*?)</span>'
return locals()
@support.scrape
def peliculas(item):
if not item.args == 'search': # pagination not works
if not item.nextpage:
item.page = 1
else:
item.page = item.nextpage
if not item.parent_url:
item.parent_url = item.url
item.nextpage = item.page + 1
nextPageUrl = "{}/page/{}".format(item.parent_url, item.nextpage)
resp = httptools.downloadpage(nextPageUrl, only_headers = True)
if (resp.code > 399): # no more elements
nextPageUrl = ''
patron = r'<div data-elementor-type="loop-item".*?<a.*?url="(?P<thumb>[^"]+).*?<a href=\"(?P<url>[^"]+)\">(?P<title>.*?)</a>.*?<span class="elementor-heading-title elementor-size-default">(?P<year>.*?)</span>'
def itemlistHook(itemlist):
return itemlist[:-1:]
return locals()
def search(item, text):
item.url = "{}/?{}".format(host, support.urlencode({'s': text}))
item.args = 'search'
try:
return peliculas(item)
except:
import sys
for line in sys.exc_info():
logger.error("search except: %s" % line)
return []
def findvideos(item):
support.info()
data = httptools.downloadpage(item.url).data
video_url = support.match(data, patron=r'<a href="([^"]+)" rel="nofollow" title="Guarda il film in streaming">' ).match
if (video_url == ''):
return []
item.url = video_url
itemlist = support.server(item)
return itemlist

0
channels/discoveryplus.json Executable file → Normal file
View File

77
channels/discoveryplus.py Executable file → Normal file
View File

@@ -6,7 +6,7 @@ import functools
import requests, uuid import requests, uuid
from core import jsontools, support, httptools from core import jsontools, support, httptools
from platformcode import logger, config from platformcode import logger
typo = support.typo typo = support.typo
@@ -18,12 +18,11 @@ deviceId = uuid.uuid4().hex
# domain = 'https://eu1-prod-direct.discoveryplus.com' # domain = 'https://eu1-prod-direct.discoveryplus.com'
domain = 'https://' + session.get("https://prod-realmservice.mercury.dnitv.com/realm-config/www.discoveryplus.com%2Fit%2Fepg").json()["domain"] domain = 'https://' + session.get("https://prod-realmservice.mercury.dnitv.com/realm-config/www.discoveryplus.com%2Fit%2Fepg").json()["domain"]
token = session.get('{}/token?deviceId={}&realm=dplay&shortlived=true'.format(domain, deviceId)).json()['data']['attributes']['token'] token = session.get('{}/token?deviceId={}&realm=dplay&shortlived=true'.format(domain, deviceId)).json()['data']['attributes']['token']
session.headers = {'User-Agent': httptools.get_user_agent(), #'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0', session.headers = {'User-Agent': 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0',
'Referer': host, 'Referer': host,
'Origin': host, 'Origin': host,
'Cookie': 'st={}'.format(token), 'Cookie': 'st={}'.format(token),
'content-type': 'application/json', 'content-type': 'application/json',
'x-disco-client': 'WEB:UNKNOWN:dplus_us:2.46.0',
'x-disco-params': 'realm=dplay,siteLookupKey=dplus_it'} 'x-disco-params': 'realm=dplay,siteLookupKey=dplus_it'}
@support.menu @support.menu
@@ -55,8 +54,7 @@ def live(item):
logger.debug() logger.debug()
itemlist =[] itemlist =[]
# data = session.get(domain + '/cms/routes/epg?include=default').json()['included'] data = session.get(domain + '/cms/routes/epg?include=default').json()['included']
data = session.get(domain + '/cms/routes/home?include=default&decorators=playbackAllowed').json()['included']
for key in data: for key in data:
@@ -168,7 +166,7 @@ def seasons(item):
data = session.get('{}/cms/routes/show/{}?include=default'.format(domain, item.programid)).json()['included'] data = session.get('{}/cms/routes/show/{}?include=default'.format(domain, item.programid)).json()['included']
for key in data: for key in data:
if key['type'] == 'collection' and 'filters' in key['attributes']['component']: if key['type'] == 'collection':
for option in key['attributes']['component']['filters'][0]['options']: for option in key['attributes']['component']['filters'][0]['options']:
itemlist.append(item.clone(title="Stagione {}".format(option['value']), itemlist.append(item.clone(title="Stagione {}".format(option['value']),
season=int(option['value']), season=int(option['value']),
@@ -179,15 +177,6 @@ def seasons(item):
action='episodios')) action='episodios'))
break break
if key['type'] == 'collection' and 'title' in key['attributes']:
itemlist.append(
item.clone(title=typo(key['attributes']['title'],'bold'),
plot=key['attributes'].get('description',''),
programid=key['attributes']['alias'],
id=key['id'],
action='episodios',
contentType='season'))
return itemlist return itemlist
@@ -200,21 +189,13 @@ def episodios(item):
for key in data: for key in data:
if key['type'] == 'video' and 'Free' in str(key.get('relationships',{}).get('contentPackages',{}).get('data',[])): if key['type'] == 'video' and 'Free' in str(key.get('relationships',{}).get('contentPackages',{}).get('data',[])):
if item.season: itemlist.append(item.clone(title = "{}x{:02d} - {}".format(item.season, key['attributes']['episodeNumber'], key['attributes']['name']),
itemlist.append(item.clone(title = "{}x{:02d} - {}".format(item.season, key['attributes']['episodeNumber'], key['attributes']['name']),
plot = key['attributes']['description'], plot = key['attributes']['description'],
episode = key['attributes']['episodeNumber'], episode = key['attributes']['episodeNumber'],
contentType = 'episode', contentType = 'episode',
action = 'findvideos', action = 'findvideos',
thumbnail = images[key['relationships']['images']['data'][0]['id']], thumbnail = images[key['relationships']['images']['data'][0]['id']],
id=key['id'])) id=key['id']))
else:
itemlist.append(item.clone(title = key['attributes']['name'],
plot = key['attributes']['longDescription'],
contentType = 'episode',
action = 'findvideos',
thumbnail = images[key['relationships']['images']['data'][0]['id']],
id=key['id']))
itemlist.sort(key=lambda it: it.episode) itemlist.sort(key=lambda it: it.episode)
@@ -229,52 +210,16 @@ def findvideos(item):
logger.debug() logger.debug()
content = 'video' if item.contentType == 'episode' else 'channel' content = 'video' if item.contentType == 'episode' else 'channel'
post = {content + 'Id': item.id, 'deviceInfo': {'adBlocker': False,'drmSupported': True}}
post = {content + 'Id': item.id,
'deviceInfo': {
'adBlocker': 'true',
'drmSupported': 'true',
'hwDecodingCapabilities': [],
'screen':{
'width':1920,
'height':1080
},
'player':{
'width':1920,
'height':1080
}
},
'wisteriaProperties':{
'advertiser': {
'firstPlay': 0,
'fwIsLat': 0
},
'device':{
'browser':{
'name': 'chrome',
'version': config.get_setting("chrome_ua_version")
},
'type': 'desktop'
},
'platform': 'desktop',
'product': 'dplus_emea',
'sessionId': deviceId,
'streamProvider': {
'suspendBeaconing': 0,
'hlsVersion': 6,
'pingConfig': 1
}
}
}
data = session.post('{}/playback/v3/{}PlaybackInfo'.format(domain, content), json=post).json().get('data',{}).get('attributes',{}) data = session.post('{}/playback/v3/{}PlaybackInfo'.format(domain, content), json=post).json().get('data',{}).get('attributes',{})
if data.get('streaming', [{}])[0].get('protection', {}).get('drmEnabled',False):
item.url = data['streaming'][0]['url'] if data.get('protection', {}).get('drmEnabled',False):
item.url = data['streaming']['dash']['url']
item.drm = 'com.widevine.alpha' item.drm = 'com.widevine.alpha'
item.license ="{}|PreAuthorization={}|R{{SSM}}|".format(data['streaming'][0]['protection']['schemes']['widevine']['licenseUrl'], item.license ="{}|PreAuthorization={}|R{{SSM}}|".format(data['protection']['schemes']['widevine']['licenseUrl'], data['protection']['drmToken'])
data['streaming'][0]['protection']['drmToken'])
else: else:
item.url = data['streaming'][0]['url'] item.url = data['streaming'][0]['url']
item.manifest = 'hls' item.manifest = 'hls'
return support.server(item, itemlist=[item], Download=False, Videolibrary=False) return support.server(item, itemlist=[item], Download=False, Videolibrary=False)

0
channels/dreamsub.json Executable file → Normal file
View File

0
channels/dreamsub.py Executable file → Normal file
View File

6
channels/eurostreaming.json Executable file → Normal file
View File

@@ -1,10 +1,10 @@
{ {
"id": "eurostreaming", "id": "eurostreaming",
"name": "Eurostreaming", "name": "Eurostreaming",
"active": false, "active": true,
"language": ["ita", "sub-ita"], "language": ["ita","sub-ita"],
"thumbnail": "eurostreaming.png", "thumbnail": "eurostreaming.png",
"banner": "eurostreaming.png", "banner": "eurostreaming.png",
"categories": ["tvshow", "anime", "vos"], "categories": ["tvshow","anime","vos"],
"settings": [] "settings": []
} }

7
channels/eurostreaming.py Executable file → Normal file
View File

@@ -31,7 +31,7 @@ def mainlist(item):
def peliculas(item): def peliculas(item):
# debug = True # debug = True
action = 'episodios' action = 'episodios'
if item.args == 'newest': if item.args == 'newest':
item.contentType = 'episode' item.contentType = 'episode'
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+) \s*<a href="(?P<url>[^"]+)"[^>]*>\s+?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<\(]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>' patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+) \s*<a href="(?P<url>[^"]+)"[^>]*>\s+?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<\(]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>'
@@ -49,9 +49,8 @@ def episodios(item):
data = support.match(item, headers=headers).data data = support.match(item, headers=headers).data
if 'clicca qui per aprire' in data.lower(): data = support.match(support.match(data, patron=r'"go_to":"([^"]+)"').match.replace('\\',''), headers=headers).data if 'clicca qui per aprire' in data.lower(): data = support.match(support.match(data, patron=r'"go_to":"([^"]+)"').match.replace('\\',''), headers=headers).data
elif 'clicca qui</span>' in data.lower(): data = support.match(support.match(data, patron=r'<h2 style="text-align: center;"><a href="([^"]+)">').match, headers=headers).data elif 'clicca qui</span>' in data.lower(): data = support.match(support.match(data, patron=r'<h2 style="text-align: center;"><a href="([^"]+)">').match, headers=headers).data
patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>' patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
patron = r'(?P<season>\d+)&#215;(?P<episode>\d+)(</strong>)*(?P<title>.*?)<(?P<other>.*?br/>)' patron = r'(?P<season>\d+)&#\d+;(?P<episode>\d+(?:-\d+)?)\s*(?:</strong>|<em>)?\s*(?P<title>.*?)(?:–|-.+?-|–.+?–|–|em|.)?(?:/em.*?)?(?:<a (?P<other>.*?))?<br />'
def itemHook(i): def itemHook(i):
i.url = item.url i.url = item.url
@@ -85,7 +84,7 @@ def newest(categoria):
item.contentType = 'tvshow' item.contentType = 'tvshow'
item.args = 'newest' item.args = 'newest'
try: try:
item.url = "%s/aggiornamento-episodi-nuovi/" % host item.url = "%s/aggiornamento-nuovi-episodi/" % host
item.action = "peliculas" item.action = "peliculas"
itemlist = peliculas(item) itemlist = peliculas(item)
# Continua la ricerca in caso di errore # Continua la ricerca in caso di errore

0
channels/eurostreaming_actor.json Executable file → Normal file
View File

6
channels/eurostreaming_actor.py Executable file → Normal file
View File

@@ -31,9 +31,9 @@ def peliculas(item):
patronNext = r'class="next".*?"(.+?)"' patronNext = r'class="next".*?"(.+?)"'
else: else:
patron = r'<div class="post-thumb">.*?<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)[\<]' patron = r'<div class="post-thumb">.*?<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)[\<]?[/(](?P<year>.*?)[\)|a]'
patronNext = r'next.*?href="(.*?)"' patronNext = r'next.*?href="(.*?)"'
# debug = True
return locals() return locals()
@@ -48,7 +48,7 @@ def episodios(item):
data = support.match(support.match(data, patron=r'<h2 style="text-align: center;"><a href="([^"]+)">').match, headers=headers).data data = support.match(support.match(data, patron=r'<h2 style="text-align: center;"><a href="([^"]+)">').match, headers=headers).data
patronBlock = r'tab-content(?P<block>.*?)serie-player' patronBlock = r'tab-content(?P<block>.*?)serie-player'
patron = r'data.num..(?P<season>\d+)x(?P<episode>\d+)" data-title="(?P<title>[^"]+).*?data-link="(?P<url>http.*?)</li>' patron = r'data-link="(?P<url>http.*?)".*?data.num..(?P<season>\d+)x(?P<episode>\d+)" data-title="(?P<title>[^"]+)'
return locals() return locals()

2
channels/filmpertutti.json Executable file → Normal file
View File

@@ -5,6 +5,6 @@
"language": ["ita", "sub-ita"], "language": ["ita", "sub-ita"],
"thumbnail": "filmpertutti.png", "thumbnail": "filmpertutti.png",
"banner": "filmpertutti.png", "banner": "filmpertutti.png",
"categories": ["anime", "tvshow","movie"], "categories": ["tvshow","movie"],
"settings": [] "settings": []
} }

168
channels/filmpertutti.py Executable file → Normal file
View File

@@ -3,9 +3,9 @@
# Canale per filmpertutti.py # Canale per filmpertutti.py
# ------------------------------------------------------------ # ------------------------------------------------------------
from core import httptools, support, scrapertools from core import httptools, support
from core.item import Item from core.item import Item
from platformcode import config, logger from platformcode import config
def findhost(url): def findhost(url):
page = httptools.downloadpage(url).data page = httptools.downloadpage(url).data
@@ -15,20 +15,17 @@ def findhost(url):
host = config.get_channel_url(findhost) host = config.get_channel_url(findhost)
headers = [['Referer', host]] headers = [['Referer', host]]
@support.menu @support.menu
def mainlist(item): def mainlist(item):
film = ['/category/film/feed/', film = ['/category/film/',
('Film al cinema', ['/category/ora-al-cinema/feed/', 'peliculas']), ('Generi', ['/category/film/', 'genres', 'lettersF'])
('Generi', ['/', 'genres']),
('Saghe', ['/', 'genres', 'saghe']),
] ]
tvshow = ['/category/serie-tv/feed/', tvshow = ['/category/serie-tv/',
] ('Aggiornamenti', ['/aggiornamenti-serie-tv/', 'peliculas', 'newest']),
('Per Lettera', ['/category/serie-tv/', 'genres', 'lettersS'])
anime = ['/category/anime/feed/',
('SUB-ITA',['/category/anime-sub-ita/feed/', 'peliculas']),
] ]
search = '' search = ''
@@ -37,107 +34,94 @@ def mainlist(item):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
if not item.args == 'search': # pagination not works support.info()
if not item.nextpage: # debug = True
item.page = 1 #debugBlock = True
else: # support.dbg()
item.page = item.nextpage
if not item.parent_url: if item.args != 'newest':
item.parent_url = item.url patronBlock = r'<ul class="posts">(?P<block>.*)<\/ul>'
patron = r'<li><a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\[(?P<lang>Sub-ITA)\])?(?:[ ]\[?(?P<quality>[HD]+)?\])?(?:[ ]\((?P<year>\d+)\)?)?<\/div>'
patronNext = r'<a href="([^"]+)[^>]+>Pagina'
else:
patronBlock = r'<ul class="posts">(?P<block>.*)<div class="clear[^"]*">'
patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\s\[(?P<quality>HD)\])?<\/div>\s*<div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?'
if item.args == 'genres': if item.args == 'search':
action = 'check' action = 'check'
elif item.contentType == 'tvshow':
item.nextpage = item.page + 1 action = 'episodios'
nextPageUrl = "{}/?paged={}".format(item.parent_url, item.nextpage) elif item.contentType == 'movie':
patron= r'<item>\s<title>(?P<title>[^<]+?)\s*(\((?P<lang>Sub-[a-zA-Z]+)*\))?\s*(\[(?P<quality>[A-Z]*)\])?\s*(\((?P<year>[0-9]{4})\))?</title>.*?<link>(?P<url>.*?)</link>' action ='findvideos'
def fullItemlistHook(itemlist):
if len(itemlist) < 10:
return itemlist[:-1:]
else:
return itemlist
else: else:
action = 'check' action = 'check'
patron= r'<article class=\"elementor-post.*?(<img .*?src=\"(?P<thumb>[^\"]+).*?)?<h3 class=\"elementor-post__title\".*?<a href=\"(?P<url>[^\"]+)\" >\s*(?P<title>[^<]+?)\s*(\((?P<lang>Sub-[a-zA-Z]+)*\))?\s*(\[(?P<quality>[A-Z]*)\])?\s*(\((?P<year>[0-9]{4})\))?\s+<'
def itemHook(item):
item.title = item.title.replace(' - La Serie', '')
return item
return locals() return locals()
@support.scrape
def episodios(item): def episodios(item):
item.quality = '' # debug = True
data = item.data if item.data else httptools.downloadpage(item.url).data data = support.match(item.url, headers=headers).data
itemlist = [] if 'accordion-item' in data:
patronBlock = r'<span class="season[^>]*>\d+[^>]+>[^>]+>[^>]+>[^>]+>\D*(?:STAGIONE|Stagione)[ -]+(?P<lang>[a-zA-Z\- ]+)[^<]*</span>(?P<block>.*?)<div id="(?:season|disqus)'
patron = r'<img src="(?P<thumb>[^"]+)"(?:[^>]*>){4}\s*<li class="season-no">(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<0-9]*<\/li>(?P<data>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
else:
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?:&nbsp;|<strong>|<div class="addtoany)'
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<]+(?P<data>.*?)(?:<br|</p)'
for it in support.match(data, patron=[r'div class=\"single-season.*?(?P<id>season_[0-9]+).*?>Stagione:\s(?P<season>[0-9]+).*?(\s-\s(?P<lang>[a-zA-z]+?))?<']).matches: def itemHook(i):
block = support.match(data, patron = r'div id=\"'+ it[0] +'\".*?</div').match i.url = item.url
for ep in support.match(block, patron=[r'<li><a href=\"(?P<url>[^\"]+).*?img\" src=\"(?P<thumb>[^\"]+).*?title\">(?P<episode>[0-9]+)\.\s+(?P<title>.*?)</span>']).matches: i.title.replace('&#215;','x')
itemlist.append(item.clone(contentType = 'episode', if not i.contentLanguage:
action='findvideos', i.contentLanguage = 'ITA'
thumb=ep[1], return i
episode=ep[2], return locals()
season=it[1],
contentSeason=it[1],
contentEpisodeNumber=ep[2],
title = support.format_longtitle(support.cleantitle(ep[3]), season = it[1], episode = ep[2], lang= it[3]),
url = scrapertools.unescape(ep[0]), data = '')
)
if config.get_setting('episode_info') and not support.stackCheck(['add_tvshow', 'get_newest']):
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
support.check_trakt(itemlist)
support.videolibrary(itemlist, item)
if (config.get_setting('downloadenabled')):
support.download(itemlist, item)
return itemlist
@support.scrape @support.scrape
def genres(item): def genres(item):
if item.args == 'lettersF':
item.contentType = 'movie'
else:
item.contentType = 'tvshow'
action = 'peliculas' action = 'peliculas'
blacklist = ['Tutti i film',] patronBlock = r'<select class="cats">(?P<block>.*?)<\/select>'
wantSaga = True if item.args == 'saghe' else False patronMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>[^<]+)<\/option>'
item.args = 'genres'
patronBlock = r'<nav class="elementor-nav-menu--main (?P<block>.*?)</nav>'
patronMenu = r'<li class="menu-item.*?<a href="(?P<url>https:\/\/.*?)".*?>(?P<title>.*?)</a></li>'
def itemHook(item):
item.url = "{}/feed/".format(item.url)
return item
def itemlistHook(itemlist):
itl = []
for item in itemlist:
isSaga = item.fulltitle.startswith('Saga')
if len(item.fulltitle) != 3:
if (isSaga and wantSaga) or (not isSaga and not wantSaga):
itl.append(item)
return itl
return locals() return locals()
def check(item): def check(item):
item.data = httptools.downloadpage(item.url).data support.info()
if 'season-details' in item.data.lower(): patron=r'class="taxonomy category"\s*><span property="name">([^>]+)</span></a><meta property="position" content="2">'
item.contentType = 'tvshow' block = support.match(item.url, patron=patron,headers=headers).match
if block.lower() != 'film':
support.info('select = ### è una serie ###')
item.contentType='tvshow'
return episodios(item) return episodios(item)
else: else:
item.contentType = 'movie' support.info('select = ### è un movie ###')
item.contentType='movie'
return findvideos(item) return findvideos(item)
def search(item, text): def search(item, texto):
item.url = "{}/?{}".format(host, support.urlencode({'s': text})) support.info()
item.url = host + "/search/" + texto
item.args = 'search' item.args = 'search'
try: try:
return peliculas(item) return peliculas(item)
# Continua la ricerca in caso di errore
except: except:
import sys import sys
for line in sys.exc_info(): for line in sys.exc_info():
logger.error("search except: %s" % line) support.info("%s" % line)
return [] return []
@@ -147,13 +131,13 @@ def newest(categoria):
item = Item() item = Item()
try: try:
if categoria == "peliculas": if categoria == "peliculas":
item.url = host + "/category/film/feed/" item.url = host + "/category/film/"
item.action = "peliculas" item.action = "peliculas"
item.extra = "movie" item.extra = "movie"
item.contentType = 'movie' item.contentType = 'movie'
itemlist = peliculas(item) itemlist = peliculas(item)
else: else:
item.url = host + "/category/serie-tv/feed/" item.url = host + "/aggiornamenti-serie-tv/"
item.action = "peliculas" item.action = "peliculas"
item.args = "newest" item.args = "newest"
item.contentType = 'tvshow' item.contentType = 'tvshow'
@@ -170,16 +154,8 @@ def newest(categoria):
def findvideos(item): def findvideos(item):
video_url = item.url
if item.contentType == 'movie': if item.contentType == 'movie':
video_url = support.match(item.url, patron=r'<a href="([^"]+)" rel="nofollow">').match data = support.match(item.url, patron=r'<a target="_blank" rel="nofollow" href="([^"]+)">').matches
return support.server(item, data=data, patronTag='Versione: <[^>]+>([^<]+)')
video_url = support.match(video_url, patron=r'<iframe src=\"(https://.*?)\"').match else:
return support.server(item, item.data)
if (video_url == ''):
return []
itemlist = [item.clone(action="play", url=srv) for srv in support.match(video_url, patron='<div class=\"megaButton\" meta-type=\"v\" meta-link=\"([^\"]+).*?(?=>)>').matches]
itemlist = support.server(item,itemlist=itemlist)
return itemlist

2
channels/filmstreaming.json Executable file → Normal file
View File

@@ -2,7 +2,7 @@
"id": "filmstreaming", "id": "filmstreaming",
"name": "Film Streaming", "name": "Film Streaming",
"language": ["ita"], "language": ["ita"],
"active": false, "active": true,
"thumbnail": "filmstreaming.png", "thumbnail": "filmstreaming.png",
"banner": "filmstreaming.png", "banner": "filmstreaming.png",
"categories": ["movie"], "categories": ["movie"],

0
channels/filmstreaming.py Executable file → Normal file
View File

0
channels/guardaseriecam.json Executable file → Normal file
View File

8
channels/guardaseriecam.py Executable file → Normal file
View File

@@ -36,7 +36,7 @@ def list(item):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
# debug = True # debug = True
patron = r'<div class="mlnh-thumb"><a href="(?P<url>[^"]+)[^>]+title="(?P<title>[^"]+).*?<img src="(?P<thumb>[^"]+).*?hdn">[^<]*(?P<year>[0-9]{4})' patron = r'<div class="mlnh-thumb"><a href="(?P<url>[^"]+).*?title="(?P<title>[^"]+).*?src="(?P<thumb>[^"]+).*?hdn">(?P<year>[0-9]{4})'
patronNext = 'pagenavi.*?<a href="([^"]+)">\d+' patronNext = 'pagenavi.*?<a href="([^"]+)">\d+'
action = 'episodios' action = 'episodios'
return locals() return locals()
@@ -45,9 +45,9 @@ def peliculas(item):
@support.scrape @support.scrape
def episodios(item): def episodios(item):
patronBlock = r'<div class="tab-pane fade" id="season-(?P<season>.)"(?P<block>.*?)</ul>\s*</div>' patronBlock = r'<div class="tab-pane fade" id="season-(?P<season>.)"(?P<block>.*?)</ul>\s*</div>'
patron = r'(?P<data><a href="#" allowfullscreen data-link="[^"]+.*?title="(?P<title>[^"]+)(?P<lang>[sS][uU][bB]-?[iI][tT][aA])?\s*">(?P<episode>[^<]+).*?</li>)' patron = r'<a href="#" allowfullscreen data-link="(?P<url>[^"]+).*?title="(?P<title>[^"]+)(?P<lang>[sS][uU][bB]-?[iI][tT][aA])?\s*">(?P<episode>[^<]+)'
action = 'findvideos' action = 'findvideos'
# debug = True # debugBlock = True
return locals() return locals()
@@ -68,4 +68,4 @@ def search(item, text):
def findvideos(item): def findvideos(item):
logger.debug() logger.debug()
return support.server(item, item.data) return support.server(item, item.url)

0
channels/guardaserieclick.json Executable file → Normal file
View File

0
channels/guardaserieclick.py Executable file → Normal file
View File

0
channels/guardaserieicu.json Executable file → Normal file
View File

0
channels/guardaserieicu.py Executable file → Normal file
View File

0
channels/hd4me.json Executable file → Normal file
View File

2
channels/hd4me.py Executable file → Normal file
View File

@@ -57,7 +57,5 @@ def search(item, text):
def findvideos(item): def findvideos(item):
url = support.match(item, patron=r'<a class=["]?bot1["]? href="([^"]+)"').match url = support.match(item, patron=r'<a class=["]?bot1["]? href="([^"]+)"').match
if not url.startswith('http'):
url = host + url
url = support.httptools.downloadpage(url, followredirect=True).url url = support.httptools.downloadpage(url, followredirect=True).url
return support.server(item, url) return support.server(item, url)

0
channels/ilcorsaronero.json Executable file → Normal file
View File

71
channels/ilcorsaronero.py Executable file → Normal file
View File

@@ -3,59 +3,90 @@
# Canale per ilcorsaronero # Canale per ilcorsaronero
# ------------------------------------------------------------ # ------------------------------------------------------------
from core import support, httptools from core import support
# 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
host = support.config.get_channel_url() host = support.config.get_channel_url()
support.info('HOST',host) support.info('HOST',host)
# host = 'https://ilcorsaronero.xyz'
headers = [['Referer', host]] headers = [['Referer', host]]
@support.menu @support.menu
def mainlist(item): def mainlist(item):
menu = [ menu = [
('Film {film}', ['/cat/film', 'peliculas', [0, 'movie', True], 'undefined']), ('BDRiP {film}', ['/categoria.php?active=0&category=1&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True], 'undefined']),
('Serie TV', ['/cat/serie-tv', 'peliculas', [0 , 'tvshow', True], 'undefined']), ('Cerca BDRiP... {submenu} {film}', ['/torrent-ita/1/', 'search', ['search', 'movie', True], 'movie']),
('Animazione', ['/cat/animazione', 'peliculas', [0 , 'anime', True], 'undefined']), ('DVD {film}', ['/categoria.php?active=0&category=20&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True], 'undefined']),
('Documentari', ['/cat/altro/documentari', 'peliculas', [0 , 'documentary', True], 'undefined']), ('Cerca DVD... {submenu} {film}', ['/torrent-ita/20/', 'search', ['search', 'movie', True], 'movie']),
('Programmi TV', ['/cat/altro/programmi-tv', 'peliculas', [0 , 'tvshow', True], 'tvshow']), ('Screener {film}', ['/categoria.php?active=0&category=19&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True], 'undefined']),
('Video Musica', ['/cat/musica/video-musicali', 'peliculas', [0 , 'music', False], 'undefined']), ('Cerca Screener.. {submenu} {film}', ['/torrent-ita/19/', 'search', ['search', 'movie', True], 'movie']),
('Videocorsi', ['/cat/altro/videocorsi', 'peliculas', [0 , 'music', False], 'undefined']) ('Serie TV', ['/categoria.php?active=0&category=15&order=data&by=DES&page=', 'peliculas', [0 , 'tvshow', True], 'tvshow']),
('Cerca Serie TV.. {submenu}', ['/torrent-ita/15/', 'search', ['search', 'tvshow',True], 'tvshow']),
('Anime', ['/categoria.php?active=0&category=5&order=data&by=DESC&page=', 'peliculas', [0, 'anime', True], 'tvshow']),
('Cerca Anime.. {submenu}', ['/torrent-ita/5/', 'search', ['search', 'anime', True], 'tvshow']),
('Musica', ['/categoria.php?active=0&category=2&order=data&by=DESC&page=', 'peliculas', [0, 'music', False], 'music']),
('Cerca Musica.. {submenu}', ['/torrent-ita/2/', 'search', ['search', 'music', False], 'music']),
('Audiolibri {musica}', ['/categoria.php?active=0&category=18&order=data&by=DESC&page=', 'peliculas', [0, 'music', False], 'music']),
('Cerca Audiolibri.. {submenu}', ['/torrent-ita/18/', 'search', ['search', 'music', False], 'music']),
# mostrerebbe anche risultati non "multimediali" e allungherebbero inutilmente la ricerca globale
# ('Altro {film}', ['/categoria.php?active=0&category=4&order=data&by=DESC&page=', 'peliculas', [0, 'other', False]]),
# ('Cerca altro.. {submenu}', ['/torrent-ita/4/', 'search', ['search', 'other', False]]),
# ('Cerca Tutto... {color kod bold}', ['/argh.php?search=', 'search', ['search', 'all', False]])
] ]
search = ''
return locals() return locals()
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
debug = False # debug = True
action = 'findvideos' action = 'findvideos'
sceneTitle = item.args[2] sceneTitle = item.args[2]
if item.args[1] in ['tvshow', 'anime', 'music', 'other']:
patron = r'>[^"<]+'
else:
patron = r'>(?P<quality>[^"<]+)'
patron += '<TD[^>]+><A class="tab" HREF="(?P<url>[^"]+)"\s*>[^<]+<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<size>[^<]+)<[^>]+>[^>]+>[^>]+><form action="[^"]+/\d+/(?P<title>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<seed>[^<]+)'
def itemHook(item): def itemHook(item):
if not sceneTitle: if not sceneTitle:
item.title = item.title.replace('_', ' ') item.title = item.title.replace('_', ' ')
item.fulltitle = item.fulltitle.replace('_', ' ')
item.title = support.scrapertools.decodeHtmlentities(support.urlparse.unquote(item.title)) item.title = support.scrapertools.decodeHtmlentities(support.urlparse.unquote(item.title))
return item return item
patron = r'<a class="hover:underline line-clamp-1.*?href="(?P<url>[^"]+)"\s*>(?P<title>.*?)</a>[^>]+>[^>]+>[^>]+>(?P<seed>.*?)<' if 'search' not in item.args:
patronNext = r'<a href="(?P<url>[^"]+)".*?Next</span>' item.url += str(item.args[0])
def itemlistHook(itemlist):
args = item.args
args[0] += 1
support.nextPage(itemlist, item, next_page=item.url, function_or_level="peliculas")
# itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), args=args, thumbnail=support.thumb()))
return itemlist
return locals() return locals()
def search(item, text):
item.url = "{}/search?{}".format(host, support.urlencode({'q': text}))
item.args = 'search'
def search(item, text):
support.info(item, text)
if 'all' in item.args:
item.url += text
else:
item.url += text + '.html'
try: try:
return peliculas(item) return peliculas(item)
# Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
except: except:
import sys import sys
for line in sys.exc_info(): for line in sys.exc_info():
logger.error("search except: %s" % line) support.logger.error("search except: %s" % line)
return [] return []
def findvideos(item): def findvideos(item):
if item.contentType == 'tvshow': item.contentType = 'episode' if item.contentType == 'tvshow': item.contentType = 'episode'
Videolibrary = True if 'movie' in item.args else False Videolibrary = True if 'movie' in item.args else False

0
channels/ilgeniodellostreaming.json Executable file → Normal file
View File

0
channels/ilgeniodellostreaming.py Executable file → Normal file
View File

0
channels/ilgeniodellostreaming_cam.json Executable file → Normal file
View File

0
channels/ilgeniodellostreaming_cam.py Executable file → Normal file
View File

View File

@@ -1,11 +0,0 @@
{
"id": "italiafilm",
"name": "ItaliaFilm",
"language": ["ita", "sub-ita"],
"active": true,
"thumbnail": "italiafilm.png",
"banner": "",
"categories": ["movie"],
"not_active": ["include_in_newest"],
"settings": []
}

View File

@@ -1,90 +0,0 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per 'italifilm'
# ------------------------------------------------------------
from core import support, httptools, scrapertools, tmdb
from platformcode import config, logger
host = config.get_channel_url()
headers = [['Referer', host]]
@support.menu
def mainlist(item):
menu = [
('Film', ['/film/', 'list', 'film']),
('Per Genere', ['', 'list', 'genere']),
('Al Cinema', ['/cinema/', 'list', 'film']),
('Sub-ITA', ['/sub-ita/', 'list', 'film']),
('Top del Mese', ['/top-del-mese.html', 'list', 'film'])
]
search = ''
return locals()
@support.scrape
def list(item):
actLike = 'peliculas'
if item.args == 'genere':
patronBlock = r'<ul class="sub-menu">(?P<block>.*?)</ul>'
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)'
action = 'peliculas'
elif item.args == 'film':
patron = r'<div class="entry-summary.*?<a href="(?P<url>[^"]+)" title="(?P<title>[^\("]+)(?:\((?P<year>\d+)\))" class="[^"]+"><img class="lazyload" data-src="(?P<thumb>[^"]+)" alt="[^"]+".*?></a>'
patronNext = r'<a href="([^"]+)">(?:&rarr|→)'
return locals()
def peliculas(item):
data = httptools.downloadpage(item.url).data
itemlist = []
for it in support.match(data, patron=[r'<div class="entry-summary.*?<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)(?:\((?P<year>\d+)\))" class="[^"]+"><img class="lazyload" data-src="(?P<thumb>[^"]+)" alt="[^"]+".*?></a>']).matches:
infoLabels = dict()
infoLabels['title'] = it[1]
infoLabels['mediatype'] = 'movie'
infoLabels['year'] = it[2]
itemlist.append(item.clone(action='findvideos', thumbnail = host + it[3].replace(' ','%20'), title = support.cleantitle(it[1]), url= it[0], infoLabels=infoLabels))
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
if item.args == 'search':
next = support.match(data, patron=['<a name="nextlink".*list_submit\((\d+)\);.*(?:&rarr|→)']).matches
else:
next = support.match(data, patron=['<a href="([^"]+)">(?:&rarr|→)']).matches
if next:
if item.args == 'search':
item.url = "{}/?{}".format(host, support.urlencode({"story": item.search_text,"do": "search","subaction": "search", "search_start": next[0]}))
else:
item.url = next[0]
support.nextPage(itemlist = itemlist, item = item, next_page=item.url)
return itemlist
def search(item, text):
item.args = 'search'
item.url = "{}/?{}".format(host, support.urlencode({"story": text,"do": "search","subaction": "search", "search_start": item.page}))
item.search_text = text
try:
return peliculas(item)
except:
import sys
for line in sys.exc_info():
logger.error("search except: %s" % line)
return []
#action di default
def findvideos(item):
support.info('findvideos')
urls = []
data = support.match(item).data
matches = support.match(data, patron=r'<iframe.*?src="([^"]+)').matches
for m in matches:
if 'youtube' not in m and not m.endswith('.js'):
urls += support.match(m, patron=r'data-link="([^"]+)').matches
return support.server(item, urls)

0
channels/italiaserie.json Executable file → Normal file
View File

0
channels/italiaserie.py Executable file → Normal file
View File

0
channels/la7.json Executable file → Normal file
View File

45
channels/la7.py Executable file → Normal file
View File

@@ -4,8 +4,7 @@
# ------------------------------------------------------------ # ------------------------------------------------------------
import requests import requests
from core import support, httptools from core import support
from platformcode import logger
DRM = 'com.widevine.alpha' DRM = 'com.widevine.alpha'
key_widevine = "https://la7.prod.conax.cloud/widevine/license" key_widevine = "https://la7.prod.conax.cloud/widevine/license"
@@ -28,7 +27,7 @@ def mainlist(item):
('Replay {bold}', ['', 'replay_channels'])] ('Replay {bold}', ['', 'replay_channels'])]
menu = [('Programmi TV {bullet bold}', ['/tutti-i-programmi', 'peliculas', '', 'tvshow']), menu = [('Programmi TV {bullet bold}', ['/tutti-i-programmi', 'peliculas', '', 'tvshow']),
('Teche La7 {bullet bold}', ['/la7teche', 'peliculas', '', 'tvshow'])] ('Teche La7 {bullet bold}', ['/i-protagonisti', 'peliculas', '', 'tvshow'])]
search = '' search = ''
return locals() return locals()
@@ -84,18 +83,13 @@ def search(item, text):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
search = item.search search = item.search
action = 'episodios'
pagination = 20
disabletmdb = True disabletmdb = True
addVideolibrary = False addVideolibrary = False
downloadEnabled = False downloadEnabled = False
action = 'episodios'
patron = r'<a href="(?P<url>[^"]+)"[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"></div><div class="titolo">\s*(?P<title>[^<]+)<' patron = r'<a href="(?P<url>[^"]+)"[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"></div><div class="titolo">\s*(?P<title>[^<]+)<'
if 'la7teche' in item.url:
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="teche-i-img".*?url\(\'(?P<thumb>[^\']+)'
def itemHook(item): def itemHook(item):
item.thumbnail = 'http:' + item.t if item.t.startswith('//') else item.t if item.t else item.thumbnail
item.fanart = item.thumb item.fanart = item.thumb
return item return item
return locals() return locals()
@@ -103,18 +97,33 @@ def peliculas(item):
@support.scrape @support.scrape
def episodios(item): def episodios(item):
data = support.match(item).data
# debug = True
action = 'findvideos' action = 'findvideos'
if '>puntate<' in data:
patronBlock = r'>puntate<(?P<block>.*?)home-block-outbrain'
url = support.match(data, patron=r'>puntate<[^>]+>[^>]+>[^>]+><a href="([^"]+)"').match
data += support.match(host + url).data
else:
item.url += '/video'
data = support.match(item).data
patron = r'(?:<a href="(?P<url>[^"]+)">[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]*)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?(?:[^>]+>){6}?)\s*(?P<title>[^<]+)<(?:[^>]+>[^>]+>[^>]+><div class="data">(?P<date>[^<]+))?|class="heading">[^>]+>(?P<Title>[^<]+).*?window.shareUrl = "(?P<Url>[^"]+)".*?poster:\s*"(?P<Thumb>[^"]+)", title: "(?P<desc>[^"]+)"'
patronNext = r'<a href="([^"]+)">'
addVideolibrary = False addVideolibrary = False
downloadEnabled = False downloadEnabled = False
if 'la7teche' in item.url: def itemHook(item):
patron = r'<a href="(?P<url>[^"]+)">\s*<div class="holder-bg">.*?data-background-image="(?P<thumb>[^"]+)(?:[^>]+>){4}\s*(?P<title>[^<]+)(?:(?:[^>]+>){2}\s*(?P<plot>[^<]+))?' if item.Thumb: item.t = item.Thumb
else: item.thumbnail = 'http:' + item.t if item.t.startswith('//') else item.t if item.t else item.thumbnail
data = str(support.match(item.url, patron=r'"home-block home-block--oggi(.*?)</section>').matches) if item.Title: item.title = support.typo(item.Title, 'bold')
data += httptools.downloadpage(item.url + '/video').data if item.date:
item.title = support.re.sub(r'[Pp]untata (?:del )?\d+/\d+/\d+', '', item.title)
patron = r'item[^>]+>\s*<a href="(?P<url>[^"]+)">.*?image="(?P<thumb>[^"]+)(?:[^>]+>){4,5}\s*(?P<title>[\d\w][^<]+)(?:(?:[^>]+>){7}\s*(?P<title2>[\d\w][^<]+))?' item.title += support.typo(item.date, '_ [] bold')
patronNext = r'<a href="([^"]+)">' if item.desc: item.plot = item.desc
item.forcethumb = True
item.fanart = item.thumbnail
return item
return locals() return locals()

0
channels/mediasetplay.json Executable file → Normal file
View File

29
channels/mediasetplay.py Executable file → Normal file
View File

@@ -38,8 +38,8 @@ sid = res.json()['response']['sid']
session.headers.update({'authorization': 'Bearer ' + Token}) session.headers.update({'authorization': 'Bearer ' + Token})
# sessione # sessione
#sessionKey = session.get(sessionUrl.format(uuid=str(uuid.uuid4())), verify=False).json()['sessionKey'] sessionKey = session.get(sessionUrl.format(uuid=str(uuid.uuid4())), verify=False).json()['sessionKey']
#session.headers.update({'x-session': sessionKey}) session.headers.update({'x-session': sessionKey})
pagination = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100][config.get_setting('pagination', 'mediasetplay')] pagination = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100][config.get_setting('pagination', 'mediasetplay')]
@@ -48,20 +48,11 @@ pagination = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100][config.get_setting('pagin
def mainlist(item): def mainlist(item):
top = [('Dirette {bold}', ['', 'live'])] top = [('Dirette {bold}', ['', 'live'])]
menu = [('Film Più Visti {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmPiuVisti24H'}, 'movie']), menu = [('Film {bullet bold}', ['/cinema', 'peliculas', {'uxReference':'filmUltimiArrivi'}, 'movie']),
('Film ultimi arrivi {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmUltimiArrivi'}, 'movie']), ('Fiction / Serie TV {bullet bold}', ['/fiction', 'menu', '5acfcb3c23eec6000d64a6a4', 'tvshow']),
('Film Da Non Perdere {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmClustering'}, 'movie']), ('Programmi TV{ bullet bold}', ['/programmitv', 'menu', '5acfc8011de1c4000b6ec953', 'tvshow']),
('Fiction e Serie Tv del momento {submenu}', ['/fiction', 'peliculas', {'uxReference':'fictionSerieTvDelMomento'}, 'tvshow']), ('Documentari {bullet bold}', ['/documentari', 'menu', '5bfd17c423eec6001aec49f9', 'undefined']),
('Serie TV Piu Viste {submenu}', ['/fiction', 'peliculas', {'uxReference':'serieTvPiuViste24H'}, 'tvshow']), ('Kids {bullet bold}', ['/kids', 'menu', '5acfcb8323eec6000d64a6b3', 'undefined'])]
('Soap del momento {submenu}', ['/cinema', 'peliculas', {'uxReference':'fictionSerieTvParamsGenre', 'params': 'genre≈Soap opera'}, 'tvshow']),
('Programmi TV Prima serata{ submenu}', ['/programmitv', 'peliculas', {'uxReference':'stagioniPrimaSerata'}, 'tvshow']),
('Programmi TV Daytime{ submenu}', ['/programmitv', 'peliculas', {'uxReference':'stagioniDaytime'}, 'tvshow']),
('Talent e reality {submenu}', ['/talent', 'peliculas', {'uxReference':'multipleBlockProgrammiTv', 'userContext' :'iwiAeyJwbGF0Zm9ybSI6IndlYiJ9Aw'}, 'tvshow']),
('Kids Evergreen {submenu}', ['/kids', 'peliculas', {'uxReference':'kidsMediaset' }, 'undefined']),
('Kids Boing {submenu}', ['/kids', 'peliculas', {'uxReference':'kidsBoing' }, 'undefined']),
('Kids Cartoonito {submenu}', ['/kids', 'peliculas', {'uxReference':'kidsCartoonito' }, 'undefined']),
('Documentari più visti {submenu}', ['/documentari', 'peliculas', {'uxReference': 'documentariPiuVisti24H'}, 'undefined']),
]
search = '' search = ''
return locals() return locals()
@@ -218,7 +209,7 @@ def episodios(item):
order = 'desc' if '/programmi-tv/' in item.url else 'asc' order = 'desc' if '/programmi-tv/' in item.url else 'asc'
itemlist = [] itemlist = []
res = requests.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}{' + item.subbrand +'}&range=0-10000&sort=:publishInfo_lastPublished|' + order + ',tvSeasonEpisodeNumber').json()['entries'] res = requests.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}{' + item.subbrand +'}&sort=:publishInfo_lastPublished|' + order + ',tvSeasonEpisodeNumber').json()['entries']
for it in res: for it in res:
thumb = '' thumb = ''
@@ -301,8 +292,8 @@ def findvideos(item):
def get_from_id(item): def get_from_id(item):
#sessionKey = session.get(sessionUrl.format(uuid=str(uuid.uuid4())), verify=False).json()['sessionKey'] sessionKey = session.get(sessionUrl.format(uuid=str(uuid.uuid4())), verify=False).json()['sessionKey']
#session.headers.update({'x-session': sessionKey}) session.headers.update({'x-session': sessionKey})
res = session.get(entry.format(id=item.args)).json() res = session.get(entry.format(id=item.args)).json()
if 'components' in res: if 'components' in res:
id = quote(",".join(res["components"])) id = quote(",".join(res["components"]))

0
channels/mediasetplay.py.old Executable file → Normal file
View File

2
channels/metalvideo.json Executable file → Normal file
View File

@@ -1,7 +1,7 @@
{ {
"id": "metalvideo", "id": "metalvideo",
"name": "Metal Video", "name": "Metal Video",
"active": false, "active": true,
"language": ["*"], "language": ["*"],
"thumbnail": "metalvideo.png", "thumbnail": "metalvideo.png",
"banner": "metalvideo.png", "banner": "metalvideo.png",

37
channels/metalvideo.py Executable file → Normal file
View File

@@ -9,33 +9,37 @@ host = 'https://metalvideo.com'
headers = {'X-Requested-With': 'XMLHttpRequest'} headers = {'X-Requested-With': 'XMLHttpRequest'}
@support.menu
def mainlist(item):
menu = [('Generi',['', 'genres']),
('Ultimi Video',['/videos/latest', 'peliculas']),
('Top Video',['/videos/top', 'peliculas']),
('Cerca...',['','search',])]
return locals()
@support.scrape @support.scrape
def genres(item): def mainlist(item):
item.url = host item.url = host
action = 'peliculas' action = 'peliculas'
patronBlock = r'<div class="swiper-slide">(?P<block>.*?)<button' patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul>\s*</div'
patron = r'class="" href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)<' patron = r'<a href="(?P<url>[^"]+)"(?: class="")?>(?P<title>[^<]+)<'
def itemHook(item): def itemHook(item):
item.thumbnail = support.thumb('music') item.thumbnail = support.thumb('music')
item.contentType = 'music' item.contentType = 'music'
return item return item
def itemlistHook(itemlist):
itemlist.pop(0)
itemlist.append(
support.Item(
channel=item.channel,
title=support.typo('Cerca...', 'bold'),
contentType='music',
url=item.url,
action='search',
thumbnail=support.thumb('search')))
support.channel_config(item, itemlist)
return itemlist
return locals() return locals()
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
# debug=True # debug=True
action = 'findvideos' action = 'findvideos'
patron= r'<a href="(?P<url>[^"]+)"[^>]+>\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>[^"]+)"[^>]*>' patron= r'<img src="[^"]+" alt="(?P<title>[^"]+)" data-echo="(?P<thumb>[^"]+)"(?:[^>]+>){7}<a href="(?P<url>[^"]+)"'
patronNext = r'<a href="([^"]+)" data-load="[^"]+" class="[^"]+" title="Next' patronNext = r'<a href="([^"]+)">(?:&raquo|»)'
typeContentDict = {'': 'music'} typeContentDict = {'': 'music'}
def itemHook(item): def itemHook(item):
item.contentType = 'music' item.contentType = 'music'
@@ -45,13 +49,12 @@ def peliculas(item):
def findvideos(item): def findvideos(item):
data = support.match(item, patron=r'<source src="[^"]+').match return support.server(item, Videolibrary=False)
return support.server(item, Videolibrary=False, data=data)
def search(item, text): def search(item, text):
support.info(text) support.info(text)
item.url = host + '/search?keyword=' + text item.url = host + '/search.php?keywords=' + text + '&video-id='
try: try:
return peliculas(item) return peliculas(item)
# Continua la ricerca in caso di errore # Continua la ricerca in caso di errore

0
channels/mondoserietv.json Executable file → Normal file
View File

0
channels/mondoserietv.py Executable file → Normal file
View File

0
channels/paramount.json Executable file → Normal file
View File

0
channels/paramount.py Executable file → Normal file
View File

0
channels/piratestreaming.json Executable file → Normal file
View File

0
channels/piratestreaming.py Executable file → Normal file
View File

0
channels/plutotv.json Executable file → Normal file
View File

12
channels/plutotv.py Executable file → Normal file
View File

@@ -6,7 +6,7 @@
import uuid, datetime import uuid, datetime
from platformcode import logger, config from platformcode import logger, config
from core.item import Item from core.item import Item
from core import jsontools, support, httptools from core import support, httptools
host = support.config.get_channel_url() host = support.config.get_channel_url()
@@ -14,20 +14,17 @@ api = 'https://api.pluto.tv'
UUID = 'sid={}&deviceId={}'.format(uuid.uuid1().hex, uuid.uuid4().hex) UUID = 'sid={}&deviceId={}'.format(uuid.uuid1().hex, uuid.uuid4().hex)
vod_url = '{}/v3/vod/categories?includeItems=true&deviceType=web&'.format(api, UUID) vod_url = '{}/v3/vod/categories?includeItems=true&deviceType=web&'.format(api, UUID)
@support.menu @support.menu
def mainlist(item): def mainlist(item):
top = [('Dirette {bold}', ['/it/live-tv/', 'live'])] top = [('Dirette {bold}', ['/it/live-tv/', 'live'])]
menu = [('Categorie', ['', 'category'])] menu = sorted([(it['name'], ['/it/on-demand', 'peliculas', it['items']]) for it in httptools.downloadpage(vod_url).json['categories'][1:]])
search = '' search = ''
return locals() return locals()
@support.menu
def category(item):
menu = sorted([(it['name'], ['/it/on-demand', 'peliculas', it['items']]) for it in httptools.downloadpage(vod_url).json['categories'][1:]])
return locals()
def live(item): def live(item):
logger.debug() logger.debug()
@@ -78,7 +75,6 @@ def peliculas(item):
logger.debug() logger.debug()
itemlist = [] itemlist = []
recordlist = [] recordlist = []
for i, it in enumerate(item.args): for i, it in enumerate(item.args):
if item.search in it['name'].lower(): if item.search in it['name'].lower():
itm = Item(channel=item.channel, itm = Item(channel=item.channel,
@@ -92,7 +88,7 @@ def peliculas(item):
thumbnail= it['covers'][0]['url'], thumbnail= it['covers'][0]['url'],
fanart= it['covers'][2]['url'] if len(it['covers']) > 2 else '', fanart= it['covers'][2]['url'] if len(it['covers']) > 2 else '',
id= it['_id'], id= it['_id'],
videourl= it.get('stitched', {}).get('urls', [{}])[0].get('url','').split('?')[0]) videourl= it['stitched']['urls'][0]['url'].split('?')[0])
if i < 20 or item.search: if i < 20 or item.search:
itemlist.append(itm) itemlist.append(itm)

Some files were not shown because too many files have changed in this diff Show More