Nuovo server: dropload e fix puntate sfasate eurostreaming_actor

This commit is contained in:
marco
2022-10-16 17:16:14 +02:00
parent 61dac80edd
commit c30e1311d6
4 changed files with 70 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
{
"active": true,
"find_videos": {
"patterns": [
{
"pattern": "https?://dropload.io/(\\w{12})",
"url": "https://dropload.io/\\1"
},
{
"pattern": "https?://dropload.io/embed-(\\w{12}).html",
"url": "https://dropload.io/\\1"
}
]
},
"free": true,
"id": "dropload",
"name": "Dropload",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "$ADDON[plugin.video.kod 70708]",
"type": "bool",
"visible": true
}
],
"cloudflare": true
}
+39
View File
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
try:
import urllib.parse as urllib
except ImportError:
import urllib
from core import httptools, support
from core import scrapertools
from platformcode import logger, config
def test_video_exists(page_url):
logger.debug("(page_url='%s')" % page_url)
global data
data = httptools.downloadpage(page_url).data
if "File Not Found" in data:
return False, config.get_localized_string(70449) % "Dropload"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.debug(" url=" + page_url)
video_urls = []
global data
vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)')
if not vres: vres = scrapertools.find_multiple_matches(data, '<td>(\d+x\d+)')
data_pack = scrapertools.find_single_match(data, "</div>\n\s*<script[^>]+>(eval.function.p,a,c,k,e,.*?)\s*</script>")
if data_pack != "":
from lib import jsunpack
data = jsunpack.unpack(data_pack)
_headers = urllib.urlencode(httptools.default_headers)
video_urls = support.get_jwplayer_mediaurl(data, 'dropload')
return sorted(video_urls, key=lambda x: int(x[0].split('x')[0])) if vres else video_urls