diff --git a/plugin.video.alfa/servers/gounlimited.json b/plugin.video.alfa/servers/gounlimited.json new file mode 100644 index 00000000..d4d4cd86 --- /dev/null +++ b/plugin.video.alfa/servers/gounlimited.json @@ -0,0 +1,42 @@ +{ + "active": true, + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "https://gounlimited.to/embed-(.*?).html", + "url": "https://gounlimited.to/embed-\\1.html" + } + ] + }, + "free": true, + "id": "gounlimited", + "name": "gounlimited", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "Incluir en lista negra", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "Incluir en lista de favoritos", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "thumbnail": "https://s31.postimg.cc/bsiaj2q2j/goo.png" +} \ No newline at end of file diff --git a/plugin.video.alfa/servers/gounlimited.py b/plugin.video.alfa/servers/gounlimited.py new file mode 100644 index 00000000..dcf835af --- /dev/null +++ b/plugin.video.alfa/servers/gounlimited.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# -------------------------------------------------------- +# Conector GoUnlimited By Alfa development Group +# -------------------------------------------------------- + +import re +from core import httptools +from platformcode import logger +from core import scrapertools +from lib import jsunpack + + +def test_video_exists(page_url): + data = httptools.downloadpage(page_url).data + if data == "File was deleted": + return False, "[gounlimited] El video ha sido borrado" + return True, "" + + +def get_video_url(page_url, premium=False, user="", password="", video_password=""): + logger.info("url=" + page_url) + video_urls = [] + data = httptools.downloadpage(page_url).data + data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data) + packed_data = scrapertools.find_single_match(data, "javascript'>(eval.*?)") + unpacked = jsunpack.unpack(packed_data) + patron = "file:(.*?),label:(.*?)}" + matches = re.compile(patron, re.DOTALL).findall(unpacked) + for url, quality in matches: + video_urls.append(['%s' % quality, url]) + video_urls.sort(key=lambda x: int(x[0])) + return video_urls