aggiunto server Streamtape

This commit is contained in:
marco
2020-05-17 11:34:09 +02:00
parent 96f9b9d3d5
commit 929e2ec42d
3 changed files with 72 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ def hdpass_get_servers(item):
for mir_url, srv in scrapertools.find_multiple_matches(mir, patron_option):
mir_url = scrapertools.decodeHtmlentities(mir_url)
log(mir_url)
ret.append(Item(channel=item.channel,
action="play",
fulltitle=item.fulltitle,
@@ -58,7 +59,7 @@ def hdpass_get_servers(item):
else:
data = httptools.downloadpage(item.url).data.replace('\n', '')
patron = r'<iframe(?: id="[^"]+")? width="[^"]+" height="[^"]+" src="([^"]+)"[^>]+><\/iframe>'
url = scrapertools.find_single_match(data, patron).replace("?alta", "")
url = scrapertools.find_single_match(data, patron)
url = url.replace("&download=1", "")
if 'hdpass' not in url and 'hdplayer' not in url:
return itemlist

42
servers/streamtape.json Normal file
View File

@@ -0,0 +1,42 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "https?://streamtape\\.com/e/(\\w+)",
"url": "https://streamtape.com/e/\\1"
}
]
},
"free": true,
"id": "streamtape",
"name": "Streamtape",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@60654",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "@60655",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": ""
}

28
servers/streamtape.py Normal file
View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Conector Mixdrop By Alfa development Group
# --------------------------------------------------------
from core import httptools
from core import scrapertools
from platformcode import logger, config
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
global data
data = httptools.downloadpage(page_url).data
if "Video not found" in data:
return False, config.get_localized_string(70449) % "Streamtape"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
video_urls = []
global data
media_url = 'https://' + scrapertools.find_single_match(data, 'id="videolink"[^>]+>\n?\s*//(.*?)<') + '&stream=1'
video_urls.append([".mp4 [Streamtape]", media_url])
return video_urls