Fix filmstreaming casi particolari, nuovo server goodstream

This commit is contained in:
marco
2022-05-28 16:26:51 +02:00
parent 1401d79879
commit 4b71a0d708
5 changed files with 60 additions and 12 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "https?://evoload.io/[ve]/([a-zA-Z0-9]+)",
"pattern": "evoload.io/[ve]/([a-zA-Z0-9]+)",
"url": "https://evoload.io/e/\\1?h=https://evoload.io/v/\\1"
}
]
+4 -8
View File
@@ -11,6 +11,7 @@ from platformcode import logger
def test_video_exists(page_url):
logger.debug("(page_url='%s')" % page_url)
global json
json = get_json(page_url)
if not json or ('xstatus' in json and json['xstatus'] == 'del'):
return False, config.get_localized_string(70449) % "EvoLoad"
@@ -32,17 +33,12 @@ def get_json(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.debug("url=" + page_url)
global json
video_urls = []
json = get_json(page_url)
label = url = ''
if json:
if 'name' in json:
label = json['name']
if 'stream' in json and 'src' in json['stream']:
url = json['stream']['src']
label = json.get('name', '').split('/')[-1]
url = json.get('stream', {}).get('src', '')
if url:
video_urls.append(['%s [evoload]' % label, url])
return video_urls
+25
View File
@@ -0,0 +1,25 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "goodstream.uno/(?:video/embed/)?([a-zA-Z0-9]+)",
"url": "https://goodstream.uno/video/embed/\\1/680x420"
}
]
},
"free": true,
"id": "goodstream",
"name": "GoodStream",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@70708",
"type": "bool",
"visible": true
}
]
}
+23
View File
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from core import httptools
from core import scrapertools
from platformcode import config, logger
def test_video_exists(page_url):
global data
page = httptools.downloadpage(page_url)
data = page.data
if page.code == 404:
return False, config.get_localized_string(70449) % "GoodStream"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
global data
logger.debug("(page_url='%s')" % page_url)
video_urls = []
matches = scrapertools.find_multiple_matches(data, '<source src="([^"]+)" type="video/(\w+)')
for media_url, ext in matches:
video_urls.append([ext, media_url])
return video_urls