From edd984555bbff528e2f8dbc1db6bb298f09141c4 Mon Sep 17 00:00:00 2001
From: mac12m99 <10120390+mac12m99@users.noreply.github.com>
Date: Tue, 7 Sep 2021 20:54:10 +0200
Subject: [PATCH] Fix altaCommunity e streamtape
---
channels.json | 2 +-
channels/altadefinizionecommunity.py | 17 +++++++++--------
servers/streamtape.py | 2 +-
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/channels.json b/channels.json
index 5ae7e2d9..95ad3733 100644
--- a/channels.json
+++ b/channels.json
@@ -41,13 +41,13 @@
"streamingcommunity": "https://streamingcommunity.vip",
"streamtime": "https://t.me/s/StreamTime",
"tantifilm": "https://www.tantifilm.stream",
+ "altadefinizionecommunity": "https://altaregistrazione.com",
"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.py b/channels/altadefinizionecommunity.py
index e29a0cfc..7190b499 100644
--- a/channels/altadefinizionecommunity.py
+++ b/channels/altadefinizionecommunity.py
@@ -8,11 +8,11 @@ from platformcode import config, platformtools, logger
from core import scrapertools, httptools
-def findhost(url):
- return support.match(url, patron=r'Accedi').match
+# def findhost(url):
+# return support.match(url, patron=r'Accedi').match
-host = config.get_channel_url(findhost)
+host = config.get_channel_url()
register_url = 'https://altaregistrazione.com'
headers = {'Referer': host, 'x-requested-with': 'XMLHttpRequest'}
@@ -23,17 +23,17 @@ def mainlist(item):
film = ['/load-more-film?anno=&order=&support_webp=1&type=movie&page=1',
# Voce Menu,['url','action','args',contentType]
- ('Generi Film', ['', 'genres', 'genres']),
+ ('Generi Film', ['/film/movie', 'genres', 'genres']),
]
tvshow = ['/load-more-film?type=tvshow&anno=&order=&support_webp=1&page=1',
# Voce Menu,['url','action','args',contentType]
- ('Generi Serie TV', ['', 'genres', 'genres']),
+ ('Generi Serie TV', ['/film/movie', 'genres', 'genres']),
]
altri = [
# ('A-Z', ['/lista-film', 'genres', 'letters']),
- ('Qualità ', ['', 'genres', 'quality']),
+ ('Qualità ', ['/film/movie', 'genres', 'quality']),
('Anni', ['/anno', 'genres', 'years'])
]
search = ''
@@ -200,8 +200,9 @@ def genres(item):
@support.scrape
def episodios(item):
logger.debug(item)
+ # debug = True
data = item.data
- patron = r'class="playtvshow " data-href="(?P[^"]+)'
+ patron = r'class="playtvshow "\s+data-href="(?P[^"]+)'
def itemHook(it):
spl = it.url.split('/')[-2:]
@@ -250,4 +251,4 @@ def resolve_url(item):
video_url = playWindow.match
item.data = playWindow.data
item.url = video_url.replace('/watch-unsubscribed', '/watch-external')
- return item
\ No newline at end of file
+ return item
diff --git a/servers/streamtape.py b/servers/streamtape.py
index 3ce27083..3e31bc98 100644
--- a/servers/streamtape.py
+++ b/servers/streamtape.py
@@ -30,7 +30,7 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.debug("url=" + page_url)
video_urls = []
- find_url = match(data, patron=r'innerHTML = ([^;]+)').match
+ find_url = match(data, patron=r'innerHTML = ([^;]+)').matches[-1]
possible_url = js2py.eval_js(find_url)
url = "https:" + possible_url
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")