Aggiunto canale streamingITA, streamingcommunity nuovo URL
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
"serietvsubita": "http://serietvsubita.xyz",
|
||||
"serietvu": "https://www.serietvu.live",
|
||||
"streamtime": "https://t.me/s/StreamTime",
|
||||
"streamingita": "https://www.streamingita.pro",
|
||||
"streamingcommunity": "https://streamingcommunity.space",
|
||||
"tantifilm": "https://www.tantifilm.cfd",
|
||||
"tapmovie": "https://it.tapmovie.net",
|
||||
"toonitalia": "https://toonitalia.co",
|
||||
@@ -47,7 +49,6 @@
|
||||
"findhost": {
|
||||
"altadefinizionecommunity": "https://altaregistrazione.net",
|
||||
"animealtadefinizione": "https://www.animealtadefinizione.it",
|
||||
"filmpertutti": "https://filmpertuttiii.nuovo.live",
|
||||
"streamingcommunity": "https://streamingcommunity-nuovo.link"
|
||||
"filmpertutti": "https://filmpertuttiii.nuovo.live"
|
||||
}
|
||||
}
|
||||
@@ -9,33 +9,34 @@ from core import support, channeltools, httptools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def findhost(url):
|
||||
return 'https://' + support.match(url, patron='var domain\s*=\s*"([^"]+)').match
|
||||
# def findhost(url):
|
||||
# return 'https://' + support.match(url, patron='var domain\s*=\s*"([^"]+)').match
|
||||
|
||||
|
||||
host = support.config.get_channel_url(findhost)
|
||||
host = support.config.get_channel_url()
|
||||
session = requests.Session()
|
||||
session.request = functools.partial(session.request, timeout=httptools.HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT)
|
||||
headers = {}
|
||||
|
||||
|
||||
def getHeaders(forced=False):
|
||||
global headers
|
||||
global host
|
||||
if not headers:
|
||||
try:
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'}
|
||||
response = session.get(host, headers=headers)
|
||||
if not response.url.startswith(host):
|
||||
host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
csrf_token = support.match(response.text, patron='name="csrf-token" content="([^"]+)"').match
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'Referer': host,
|
||||
'x-csrf-token': csrf_token,
|
||||
'Cookie': '; '.join([x.name + '=' + x.value for x in response.cookies])}
|
||||
except:
|
||||
host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
if not forced: getHeaders(True)
|
||||
# try:
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'}
|
||||
response = session.get(host, headers=headers)
|
||||
# if not response.url.startswith(host):
|
||||
# host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
csrf_token = support.match(response.text, patron='name="csrf-token" content="([^"]+)"').match
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'Referer': host,
|
||||
'x-csrf-token': csrf_token,
|
||||
'Cookie': '; '.join([x.name + '=' + x.value for x in response.cookies])}
|
||||
# except:
|
||||
# host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
# if not forced: getHeaders(True)
|
||||
|
||||
getHeaders()
|
||||
|
||||
|
||||
11
channels/streamingita.json
Normal file
11
channels/streamingita.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "streamingita",
|
||||
"name": "StreamingITA",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"thumbnail": "streamingita.png",
|
||||
"banner": "streamingita.png",
|
||||
"categories": ["tvshow", "movie"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime", "include_in_newest_series"],
|
||||
"settings": []
|
||||
}
|
||||
74
channels/streamingita.py
Normal file
74
channels/streamingita.py
Normal file
@@ -0,0 +1,74 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per streamingITA
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/film']
|
||||
top = [('Generi', ['/film', 'menu', 'genres']),
|
||||
('Anno', ['/film', 'menu', 'releases'])]
|
||||
tvshow = ['/tv']
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info('search', text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
return support.dooplay_peliculas(item, False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
itemlist = support.dooplay_get_episodes(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
itemlist.append(
|
||||
item.clone(action="play", url=link['url']))
|
||||
# if item.contentType == 'episode':
|
||||
# linkHead = support.httptools.downloadpage(item.url, only_headers=True).headers['link']
|
||||
# epId = support.scrapertools.find_single_match(linkHead, r'\?p=([0-9]+)>')
|
||||
# for link in support.dooplay_get_links(item, host, paramList=[['tv', epId, 1, 'title', 'server']]):
|
||||
# itemlist.append(
|
||||
# item.clone(action="play", url=link['url']))
|
||||
# else:
|
||||
# for link, quality in support.match(item.url, patron="(" + host + """links/[^"]+).*?class="quality">([^<]+)""").matches:
|
||||
# srv = support.servertools.find_video_items(data=support.httptools.downloadpage(link).data)
|
||||
# for s in srv:
|
||||
# s.quality = quality
|
||||
# itemlist.extend(srv)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
# debug = True
|
||||
if item.args in ['genres', 'releases']:
|
||||
patronBlock = r'<nav class="' + item.args + r'">(?P<block>.*?)</nav'
|
||||
patronMenu= r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<'
|
||||
else:
|
||||
patronBlock = r'class="main-header">(?P<block>.*?)headitems'
|
||||
patronMenu = r'(?P<url>' + host + r'quality/[^/]+/\?post_type=movies)">(?P<title>[^<]+)'
|
||||
return locals()
|
||||
@@ -729,7 +729,7 @@ def dooplay_search(item, blacklist=""):
|
||||
|
||||
|
||||
def dooplay_search_vars(item, blacklist):
|
||||
if item.contentType == 'list': # ricerca globale
|
||||
if item.contentType == 'undefined': # ricerca globale
|
||||
type = '(?P<type>movies|tvshows)'
|
||||
typeActionDict = {'findvideos': ['movies'], 'episodios': ['tvshows']}
|
||||
typeContentDict = {'movie': ['movies'], 'tvshow': ['tvshows']}
|
||||
|
||||
@@ -11,7 +11,7 @@ from platformcode import logger, config
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
response = httptools.downloadpage(page_url)
|
||||
if not response.sucess or "Not Found" in response.data or "File was deleted" in response.data \
|
||||
if not response.success or "Not Found" in response.data or "File was deleted" in response.data \
|
||||
or "is no longer available" in response.data:
|
||||
return False, config.get_localized_string(70449) % "Streamlare"
|
||||
return True, ""
|
||||
|
||||
Reference in New Issue
Block a user