plugins.ine: removed

This commit is contained in:
back-to 2021-06-05 14:59:38 +02:00 committed by Forrest
parent d9316cf9a5
commit bfbf26b180
4 changed files with 1 additions and 69 deletions

View File

@ -92,7 +92,6 @@ huomao - huomao.com Yes Yes
- huomao.tv
huya huya.com Yes No
idf1 idf1.fr Yes Yes
ine ine.com --- Yes
invintus player.invintus.com Yes Yes
kugou fanxing.kugou.com Yes --
latina latina.pe Yes No Streams may be geo-restricted to Peru.

View File

@ -46,6 +46,7 @@ gaminglive
gomexp
googledocs
hitbox
ine
itvplayer
kanal7
kingkong

View File

@ -1,58 +0,0 @@
import json
import logging
import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream, HTTPStream
from streamlink.utils import update_scheme
log = logging.getLogger(__name__)
class INE(Plugin):
url_re = re.compile(r"""https://streaming\.ine\.com/play\#?/
([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/?
(.*?)""", re.VERBOSE)
play_url = "https://streaming.ine.com/play/{vid}/watch"
js_re = re.compile(r'''script type="text/javascript" src="(https://content\.jwplatform\.com/players/.*?)"''')
jwplayer_re = re.compile(r'''jwConfig\s*=\s*(\{.*\});''', re.DOTALL)
setup_schema = validate.Schema(
validate.transform(jwplayer_re.search),
validate.any(
None,
validate.all(
validate.get(1),
validate.transform(json.loads),
{"playlist": validate.text},
validate.get("playlist")
)
)
)
@classmethod
def can_handle_url(cls, url):
return cls.url_re.match(url) is not None
def _get_streams(self):
vid = self.url_re.match(self.url).group(1)
log.debug("Found video ID: {0}".format(vid))
page = self.session.http.get(self.play_url.format(vid=vid))
js_url_m = self.js_re.search(page.text)
if js_url_m:
js_url = js_url_m.group(1)
log.debug("Loading player JS: {0}".format(js_url))
res = self.session.http.get(js_url)
metadata_url = update_scheme(self.url, self.setup_schema.validate(res.text))
data = self.session.http.json(self.session.http.get(metadata_url))
for source in data["playlist"][0]["sources"]:
if source["type"] == "application/vnd.apple.mpegurl":
yield from HLSStream.parse_variant_playlist(self.session, source["file"]).items()
elif source["type"] == "video/mp4":
yield "{0}p".format(source["height"]), HTTPStream(self.session, source["file"])
__plugin__ = INE

View File

@ -1,10 +0,0 @@
from streamlink.plugins.ine import INE
from tests.plugins import PluginCanHandleUrl
class TestPluginCanHandleUrlINE(PluginCanHandleUrl):
__plugin__ = INE
should_match = [
'https://streaming.ine.com/play/11111111-2222-3333-4444-555555555555/introduction/',
]