diff --git a/.github/workflows/updateDomainsStable.yml b/.github/workflows/updateDomainsStable.yml
new file mode 100644
index 00000000..5ab4d44a
--- /dev/null
+++ b/.github/workflows/updateDomainsStable.yml
@@ -0,0 +1,32 @@
+name: Update channel domains
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '30 17 * * *'
+
+jobs:
+ update:
+ runs-on: ubuntu-latest
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+ with:
+ ref: stable
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - 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: "stable"
+ github_token: ${{ secrets.API_TOKEN_GITHUB }}
\ No newline at end of file
diff --git a/channels.json b/channels.json
index 832ebd4d..7ab67f6c 100644
--- a/channels.json
+++ b/channels.json
@@ -1,6 +1,6 @@
{
"direct": {
- "altadefinizione01": "https://www.altadefinizione01.games",
+ "altadefinizione01": "https://www.altadefinizione01.plus",
"altadefinizione01_link": "https://altadefinizione01.travel",
"animealtadefinizione": "https://www.animealtadefinizione.it",
"animeforce": "https://www.animeforce.it",
@@ -9,43 +9,45 @@
"animeunity": "https://www.animeunity.it",
"animeuniverse": "https://www.animeuniverse.it",
"animeworld": "https://www.animeworld.tv",
+ "aniplay": "https://aniplay.it",
"casacinema": "https://www.casacinema.page",
"cb01anime": "https://www.cineblog01.red",
"cineblog01": "https://cb01.uno",
- "cinemalibero": "https://cinemalibero.blog",
+ "cinemalibero": "https://cinemalibero.bar",
"cinetecadibologna": "http://cinestore.cinetecadibologna.it",
"discoveryplus": "https://www.discoveryplus.com",
"dreamsub": "https://dreamsub.stream",
"dsda": "https://www.dsda.press",
- "eurostreaming": "https://eurostreaming.click",
+ "eurostreaming": "https://eurostreaming.bar",
"filmigratis": "https://filmigratis.org",
"guardaseriecam": "https://guardaserie.cam",
- "guardaserieclick": "https://www.guardaserie.support",
- "guardaserieicu": "https://guardaserie.agency",
+ "guardaserieclick": "https://www.guardaserie.builders",
+ "guardaserieicu": "https://guardaserie.clothing",
"hd4me": "https://hd4me.net",
"ilcorsaronero": "https://ilcorsaronero.link",
- "ilgeniodellostreaming": "https://ilgeniodellostreaming.ist",
- "ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.shop",
- "italiaserie": "https://italiaserie.cam",
+ "ilgeniodellostreaming": "https://ilgeniodellostreaming.wtf",
+ "ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.city",
+ "italiaserie": "https://italiaserie.date",
"mediasetplay": "https://www.mediasetplay.mediaset.it",
"mondoserietv": "https://mondoserietv.club",
"paramount": "https://www.paramountnetwork.it",
- "piratestreaming": "https://www.piratestreaming.shop",
+ "piratestreaming": "https://www.piratestreaming.design",
"polpotv": "https://roma.polpo.tv",
"raiplay": "https://www.raiplay.it",
- "seriehd": "https://seriehd.cam",
+ "seriehd": "https://altadefinizionecommunity.casa",
"serietvonline": "https://serietvonline.art",
"serietvsubita": "http://serietvsubita.xyz",
- "serietvu": "https://www.serietvu.link",
- "streamingcommunity": "https://streamingcommunity.xyz",
+ "serietvu": "https://www.serietvu.live",
+ "streamingcommunity": "https://streamingcommunity.vip",
"streamtime": "https://t.me/s/StreamTime",
- "tantifilm": "https://www.tantifilm.vision",
+ "tantifilm": "https://www.tantifilm.stream",
"tapmovie": "https://it.tapmovie.net",
"toonitalia": "https://toonitalia.co",
"vvvvid": "https://www.vvvvid.it"
},
"findhost": {
"altadefinizioneclick": "https://altadefinizione-nuovo.click",
+ "altadefinizionecommunity": "https://altaregistrazione.com",
"animealtadefinizione": "https://www.animealtadefinizione.it",
"filmpertutti": "https://filmpertuttiii.nuovo.live"
}
diff --git a/channels/altadefinizionecommunity.json b/channels/altadefinizionecommunity.json
new file mode 100644
index 00000000..970bab9e
--- /dev/null
+++ b/channels/altadefinizionecommunity.json
@@ -0,0 +1,27 @@
+{
+ "id": "altadefinizionecommunity",
+ "name": "Altadefinizione Community",
+ "language": ["ita", "sub-ita"],
+ "active": true,
+ "thumbnail": "altadefinizionecommunity.png",
+ "banner": "",
+ "categories": ["movie", "tvshow", "vos"],
+ "not_active": ["include_in_newest"],
+ "settings": [
+ {
+ "default": "",
+ "enabled": true,
+ "id": "username",
+ "label": "username",
+ "type": "text",
+ "visible": true
+ },
+ {
+ "default": "",
+ "enabled": true,
+ "id": "password",
+ "label": "password",
+ "type": "text",
+ "visible": true
+ }]
+}
diff --git a/channels/altadefinizionecommunity.py b/channels/altadefinizionecommunity.py
new file mode 100644
index 00000000..0ce0b608
--- /dev/null
+++ b/channels/altadefinizionecommunity.py
@@ -0,0 +1,230 @@
+# -*- coding: utf-8 -*-
+# ------------------------------------------------------------
+# Canale per Altadefinizione Community
+from logging import debug
+from core import jsontools, support
+from lib.fakeMail import Gmailnator
+from platformcode import config, platformtools, logger
+from core import scrapertools, httptools
+
+
+def findhost(url):
+ return support.match(url, patron=r'Accedi').match
+
+
+host = config.get_channel_url(findhost)
+register_url = 'https://altaregistrazione.com'
+headers = {'Referer': host, 'x-requested-with': 'XMLHttpRequest'}
+
+
+@support.menu
+def mainlist(item):
+ support.info(item)
+
+ film = ['/load-more-film?anno=&order=&support_webp=1&type=movie&page=1',
+ # Voce Menu,['url','action','args',contentType]
+ ('Generi', ['', 'genres', 'genres']),
+ ]
+
+ tvshow = ['/load-more-film?type=tvshow&anno=&order=&support_webp=1&page=1',
+ # Voce Menu,['url','action','args',contentType]
+ ('Generi', ['', 'genres', 'genres']),
+ ]
+
+ altri = [
+ # ('Per Lettera', ['/lista-film', 'genres', 'letters']),
+ ('Qualità', ['', 'genres', 'quality']),
+ # ('Anni', ['/anno', 'genres', 'years'])
+ ]
+ search = ''
+
+ return locals()
+
+
+def login():
+ r = support.httptools.downloadpage(host, cloudscraper=True)
+ Token = support.match(r.data, patron=r'name=\s*"_token"\s*value=\s*"([^"]+)', cloudscraper=True).match
+ if 'id="logged"' in r.text:
+ logger.info('Già loggato')
+ else:
+ logger.info('Login in corso')
+ post = {'_token': '',
+ 'form_action':'login',
+ 'email': config.get_setting('username', channel='altadefinizionecommunity'),
+ 'password':config.get_setting('password', channel='altadefinizionecommunity')}
+
+ r = support.httptools.downloadpage(host + '/login', post=post, headers={'referer': host}, cloudscraper=True)
+ if not r.status_code in [200, 302] or 'Email o Password non validi' in r.text:
+ platformtools.dialog_ok('AltadefinizioneCommunity', 'Username/password non validi')
+ return False
+
+ return 'id="logged"' in r.text
+
+
+def registerOrLogin():
+ if config.get_setting('username', channel='altadefinizionecommunity') and config.get_setting('password', channel='altadefinizionecommunity'):
+ if login():
+ return True
+
+ action = platformtools.dialog_yesno('AltadefinizioneCommunity',
+ 'Questo server necessita di un account, ne hai già uno oppure vuoi tentare una registrazione automatica?',
+ yeslabel='Accedi', nolabel='Tenta registrazione', customlabel='Annulla')
+ if action == 1: # accedi
+ from specials import setting
+ from core.item import Item
+ user_pre = config.get_setting('username', channel='altadefinizionecommunity')
+ password_pre = config.get_setting('password', channel='altadefinizionecommunity')
+ setting.channel_config(Item(config='altadefinizionecommunity'))
+ user_post = config.get_setting('username', channel='altadefinizionecommunity')
+ password_post = config.get_setting('password', channel='altadefinizionecommunity')
+
+ if user_pre != user_post or password_pre != password_post:
+ return registerOrLogin()
+ else:
+ return []
+ elif action == 0: # tenta registrazione
+ import random
+ import string
+ logger.debug('Registrazione automatica in corso')
+ mailbox = Gmailnator()
+ randPsw = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(10))
+ logger.debug('email: ' + mailbox.address)
+ logger.debug('pass: ' + randPsw)
+ reg = platformtools.dialog_register(register_url, email=True, password=True, email_default=mailbox.address, password_default=randPsw)
+ if not reg:
+ return False
+ regPost = httptools.downloadpage(register_url, post={'email': reg['email'], 'password': reg['password']}, cloudscraper=True)
+
+ if regPost.url == register_url:
+ error = scrapertools.htmlclean(scrapertools.find_single_match(regPost.data, 'Impossibile proseguire.*?'))
+ error = scrapertools.unescape(scrapertools.re.sub('\n\s+', ' ', error))
+ platformtools.dialog_ok('AltadefinizioneCommunity', error)
+ return False
+ if reg['email'] == mailbox.address:
+ if "L'indirizzo email risulta già registrato" in regPost.data:
+ # httptools.downloadpage(baseUrl + '/forgotPassword', post={'email': reg['email']})
+ platformtools.dialog_ok('AltadefinizioneCommunity', 'Indirizzo mail già utilizzato')
+ return False
+ mail = mailbox.waitForMail()
+ if mail:
+ checkUrl = scrapertools.find_single_match(mail.body, ']+>Verifica').replace(r'\/', '/')
+ logger.debug('CheckURL: ' + checkUrl)
+ httptools.downloadpage(checkUrl, cloudscraper=True)
+ config.set_setting('username', mailbox.address, channel='altadefinizionecommunity')
+ config.set_setting('password', randPsw, channel='altadefinizionecommunity')
+ platformtools.dialog_ok('AltadefinizioneCommunity',
+ 'Registrato automaticamente con queste credenziali:\nemail:' + mailbox.address + '\npass: ' + randPsw)
+ else:
+ platformtools.dialog_ok('AltadefinizioneCommunity', 'Impossibile registrarsi automaticamente')
+ return False
+ else:
+ platformtools.dialog_ok('AltadefinizioneCommunity', 'Hai modificato la mail quindi KoD non sarà in grado di effettuare la verifica in autonomia, apri la casella ' + reg['email']
+ + ' e clicca sul link. Premi ok quando fatto')
+ logger.debug('Registrazione completata')
+ else:
+ return False
+
+ return True
+
+
+@support.scrape
+def peliculas(item):
+ json = {}
+ action = 'check'
+ if '/load-more-film' not in item.url and '/search' not in item.url: # generi o altri menu, converto
+ import ast
+ ajax = support.match(item.url, patron='ajax_data\s*=\s*"?\s*([^;]+)', cloudscraper=True).match
+ item.url = host + '/load-more-film?' + support.urlencode(ast.literal_eval(ajax)) + '&page=1'
+ if not '/search' in item.url:
+ json = support.httptools.downloadpage(item.url, headers=headers, cloudscraper=True).json
+ data = "\n".join(json['data'])
+ else:
+ disabletmdb = True
+ data = support.httptools.downloadpage(item.url, headers=headers, cloudscraper=True).data
+ patron = r'wrapFilm">\s*\s*(?P[0-9]{4})\s*]+>[^<]+\s*(?P[^<]+).*?
]+>\s*(?P[^<[]+)(?:\[(?P[sSuUbBiItTaA-]+))?'
+
+ # paginazione
+ if json.get('have_next'):
+ def fullItemlistHook(itemlist):
+ spl = item.url.split('=')
+ url = '='.join(spl[:-1])
+ page = str(int(spl[-1])+1)
+ support.nextPage(itemlist, item, next_page='='.join((url, page)), function_or_level='peliculas')
+ return itemlist
+
+ return locals()
+
+
+def search(item, texto):
+ support.info("search ", texto)
+
+ item.args = 'search'
+ item.url = host + "/search?s={}&page=1".format(texto)
+ try:
+ return peliculas(item)
+ # Continua la ricerca in caso di errore
+ except:
+ import sys
+ for line in sys.exc_info():
+ support.logger.error("%s" % line)
+ return []
+
+
+@support.scrape
+def genres(item):
+ support.info(item)
+ data = support.httptools.downloadpage(item.url, cloudscraper=True).data
+
+ patronMenu = r'(?P[^<]+)'
+ if item.args == 'quality':
+ patronBlock = 'Risoluzione(?P.*?)'
+ else:
+ patronBlock = ('Film' if item.contentType == 'movie' else 'Serie TV') + r'\s+