From 25644495b4d8d7d0a3f4ce6402fff8568b7fba80 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sun, 17 Sep 2017 08:36:47 -0500 Subject: [PATCH 01/21] Actualizado --- plugin.video.alfa/channels/torrentlocura.py | 102 ++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/plugin.video.alfa/channels/torrentlocura.py b/plugin.video.alfa/channels/torrentlocura.py index 2a2f5f02..ba8ebbfd 100755 --- a/plugin.video.alfa/channels/torrentlocura.py +++ b/plugin.video.alfa/channels/torrentlocura.py @@ -1,10 +1,15 @@ # -*- coding: utf-8 -*- import re +import urllib +import urlparse + + from channelselector import get_thumb from core import httptools from core import scrapertools +from core import servertools from core.item import Item from platformcode import logger @@ -362,3 +367,100 @@ def episodios(item): return sorted(itemlist, key=lambda it: (int(it.contentSeason), int(it.contentEpisodeNumber))) return itemlist + +def findvideos(item): + logger.info() + itemlist = [] + + # Descarga la pagina + data = httptools.downloadpage(item.url).data + item.plot = scrapertools.find_single_match(data, '
(.*?)
') + item.plot = scrapertools.htmlclean(item.plot).strip() + item.contentPlot = item.plot + + link = scrapertools.find_single_match(data, 'href.*?=.*?"http:\/\/(?:tumejorserie|tumejorjuego).*?link=([^"]+)"') + if link != "": + link = host + link + logger.info("torrent=" + link) + itemlist.append( + Item(channel=item.channel, action="play", server="torrent", title="Vídeo en torrent", fulltitle=item.title, + url=link, thumbnail=servertools.guess_server_thumbnail("torrent"), plot=item.plot, folder=False, + parentContent=item)) + + patron = '
([^<]+)<\/div[^<]+
([^<]+)' + patron += '<\/div[^<]+
([^<]+)<\/div[^<]+
Date: Sun, 17 Sep 2017 08:38:03 -0500 Subject: [PATCH 02/21] Update divxatope.py --- plugin.video.alfa/channels/divxatope.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plugin.video.alfa/channels/divxatope.py b/plugin.video.alfa/channels/divxatope.py index 6594d685..8e48defe 100644 --- a/plugin.video.alfa/channels/divxatope.py +++ b/plugin.video.alfa/channels/divxatope.py @@ -258,12 +258,11 @@ def findvideos(item): # Descarga la pagina data = httptools.downloadpage(item.url).data - item.plot = scrapertools.find_single_match(data, '
(.*?)
') item.plot = scrapertools.htmlclean(item.plot).strip() item.contentPlot = item.plot - link = scrapertools.find_single_match(data, 'href="http://(?:tumejorserie|tumejorjuego).*?link=([^"]+)"') + link = scrapertools.find_single_match(data, 'href.*?=.*?"http:\/\/(?:tumejorserie|tumejorjuego).*?link=([^"]+)"') if link != "": link = "http://www.divxatope1.com/" + link logger.info("torrent=" + link) @@ -272,12 +271,16 @@ def findvideos(item): url=link, thumbnail=servertools.guess_server_thumbnail("torrent"), plot=item.plot, folder=False, parentContent=item)) - patron = "
Date: Sun, 17 Sep 2017 10:02:51 -0500 Subject: [PATCH 03/21] Update gvideo.py --- plugin.video.alfa/servers/gvideo.py | 46 +++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/plugin.video.alfa/servers/gvideo.py b/plugin.video.alfa/servers/gvideo.py index 575af8de..85a2be53 100644 --- a/plugin.video.alfa/servers/gvideo.py +++ b/plugin.video.alfa/servers/gvideo.py @@ -4,14 +4,19 @@ import urllib from core import httptools from core import scrapertools +from platformcode import logger def test_video_exists(page_url): + if 'googleusercontent' in page_url: + return True, "" response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url}) if "no+existe" in response.data: return False, "[gvideo] El video no existe o ha sido borrado" if "Se+ha+excedido+el" in response.data: return False, "[gvideo] Se ha excedido el número de reproducciones permitidas" + if "No+tienes+permiso" in response.data: + return False, "[gvideo] No tiene permiso para acceder a este video" return True, "" @@ -19,22 +24,39 @@ def test_video_exists(page_url): def get_video_url(page_url, user="", password="", video_password=""): video_urls = [] urls = [] - response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url}) - cookies = "" - cookie = response.headers["set-cookie"].split("HttpOnly, ") - for c in cookie: - cookies += c.split(";", 1)[0] + "; " - data = response.data.decode('unicode-escape') - data = urllib.unquote_plus(urllib.unquote_plus(data)) - headers_string = "|Cookie=" + cookies - url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)') - streams = scrapertools.find_multiple_matches(url_streams, - 'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))') + streams =[] + logger.debug('page_url: %s'%page_url) + if 'googleusercontent' in page_url: + data = httptools.downloadpage(page_url, follow_redirects = False, headers={"Referer": page_url}) + url=data.headers['location'] + logger.debug('url: %s' % url) + logger.debug("data.headers: %s" % data.headers) + quality = scrapertools.find_single_match (url, '.itag=(\d+).') + logger.debug('quality: %s' % quality) + + streams.append((quality, url)) + logger.debug('streams: %s' % streams) + headers_string="" + + else: + response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url}) + cookies = "" + cookie = response.headers["set-cookie"].split("HttpOnly, ") + for c in cookie: + cookies += c.split(";", 1)[0] + "; " + data = response.data.decode('unicode-escape') + data = urllib.unquote_plus(urllib.unquote_plus(data)) + headers_string = "|Cookie=" + cookies + url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)') + streams = scrapertools.find_multiple_matches(url_streams, + 'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))') + itags = {'18': '360p', '22': '720p', '34': '360p', '35': '480p', '37': '1080p', '43': '360p', '59': '480p'} for itag, video_url in streams: if not video_url in urls: video_url += headers_string video_urls.append([itags[itag], video_url]) urls.append(video_url) - video_urls.sort(key=lambda video_urls: int(video_urls[0].replace("p", ""))) + video_urls.sort(key=lambda video_urls: int(video_urls[0].replace("p", ""))) + return video_urls From 225e46a700a6211db7a22d4836026dc253d440b6 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sun, 17 Sep 2017 10:04:17 -0500 Subject: [PATCH 04/21] Update thevideome.json --- plugin.video.alfa/servers/thevideome.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/servers/thevideome.json b/plugin.video.alfa/servers/thevideome.json index b5fac37f..0c5c5931 100755 --- a/plugin.video.alfa/servers/thevideome.json +++ b/plugin.video.alfa/servers/thevideome.json @@ -14,7 +14,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "thevideo.me/(?:embed-|)([A-z0-9]+)", + "pattern": "(?:thevideo.me|tvad.me)/(?:embed-|)([A-z0-9]+)", "url": "http://thevideo.me/embed-\\1.html" } ] @@ -49,4 +49,4 @@ } ], "version": 1 -} \ No newline at end of file +} From 38279ea068b08f82a1a83b383d3623514a205659 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sun, 17 Sep 2017 10:11:36 -0500 Subject: [PATCH 05/21] Update peliculasrey.py --- plugin.video.alfa/channels/peliculasrey.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index 6d3dec95..4f66d450 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -175,8 +175,10 @@ def findvideos(item): for scrapedurl, server_name, language, quality in matches: language = language.strip() quality = quality.strip() - if "youapihd" in server_name.lower(): + if server_name.lower() in ["youapihd","drive"]: server_name = "gvideo" + if server_name.lower() in ["tvad"]: + server_name = "thevideome" if "pelismundo" in scrapedurl: data = httptools.downloadpage(scrapedurl, add_referer = True).data patron = 'sources.*?}],' @@ -193,7 +195,7 @@ def findvideos(item): fulltitle = item.title, server = "directo", thumbnail = item.thumbnail, - title = server_name + " (" + language + ") (Calidad " + videoitem[0] + ")", + title = server_name + " (" + language + ") (" + videoitem[0] + ")", url = videoitem[1], language = language, quality = videoitem[0] @@ -203,8 +205,7 @@ def findvideos(item): action = "play", extra = "", fulltitle = item.title, - server = "", - title = server_name + " (" + language + ") (Calidad " + quality + ")", + title = server_name + " (" + language + ") (" + quality + ")", thumbnail = item.thumbnail, url = scrapedurl, folder = False, From 1e8cea2b230c29c8ada00b1fad34c88aa7929cb3 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 08:53:18 -0500 Subject: [PATCH 06/21] Update thevideome.json --- plugin.video.alfa/servers/thevideome.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/servers/thevideome.json b/plugin.video.alfa/servers/thevideome.json index 0c5c5931..b353ed66 100755 --- a/plugin.video.alfa/servers/thevideome.json +++ b/plugin.video.alfa/servers/thevideome.json @@ -48,5 +48,6 @@ "visible": false } ], + "thumbnail": "https://s26.postimg.org/fzmu2c761/thevideo.me1.png", "version": 1 } From c62cc1df671cf482e584856bcdcffc0001870889 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 10:07:32 -0500 Subject: [PATCH 07/21] Add files via upload --- plugin.video.alfa/servers/bitpor.json | 49 +++++++++++++++++++++++++++ plugin.video.alfa/servers/bitpor.py | 27 +++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 plugin.video.alfa/servers/bitpor.json create mode 100644 plugin.video.alfa/servers/bitpor.py diff --git a/plugin.video.alfa/servers/bitpor.json b/plugin.video.alfa/servers/bitpor.json new file mode 100644 index 00000000..f35bc2a7 --- /dev/null +++ b/plugin.video.alfa/servers/bitpor.json @@ -0,0 +1,49 @@ +{ + "active": true, + "changes": [ + { + "date": "18/09/2017", + "description": "Versión inicial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "https://www.bitporno.com/e/([A-z0-9]+)", + "url": "https://www.bitporno.com/e/\\1" + } + ] + }, + "free": true, + "id": "bitpor", + "name": "bitpor", + "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://s26.postimg.org/3p7nnhpah/bitpor1.png", + "version": 1 +} diff --git a/plugin.video.alfa/servers/bitpor.py b/plugin.video.alfa/servers/bitpor.py new file mode 100644 index 00000000..f497f4fe --- /dev/null +++ b/plugin.video.alfa/servers/bitpor.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +from core import httptools +from core import scrapertools +from platformcode import logger + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + if "no longer exists" in data: + return False, "[bitpor] El fichero ha sido borrado" + + return True, "" + + +def get_video_url(page_url, user="", password="", video_password=""): + logger.info("(page_url='%s')" % page_url) + video_urls = [] + data = httptools.downloadpage(page_url).data + videourl = scrapertools.find_multiple_matches(data, 'file":"([^"]+).*?label":"([^"]+)') + scrapertools.printMatches(videourl) + for scrapedurl, scrapedquality in videourl: + scrapedurl = scrapedurl.replace("\\","") + video_urls.append([scrapedquality + " [bitpor]", scrapedurl]) + + return video_urls From 035ba396cdf3059ab66f503f1d2640567afc20cb Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 10:20:54 -0500 Subject: [PATCH 08/21] Update mailru.json --- plugin.video.alfa/servers/mailru.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/mailru.json b/plugin.video.alfa/servers/mailru.json index b7d1d70d..e29ef6d4 100755 --- a/plugin.video.alfa/servers/mailru.json +++ b/plugin.video.alfa/servers/mailru.json @@ -52,5 +52,6 @@ "visible": false } ], + "thumbnail": "https://s26.postimg.org/6ebn509jd/mailru1.png", "version": 1 -} \ No newline at end of file +} From 8bbe34507a4e79e5e7bb05319d88fda80a522df0 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 10:52:49 -0500 Subject: [PATCH 09/21] Update kingvid.py --- plugin.video.alfa/servers/kingvid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/kingvid.py b/plugin.video.alfa/servers/kingvid.py index 14489900..b669ccca 100755 --- a/plugin.video.alfa/servers/kingvid.py +++ b/plugin.video.alfa/servers/kingvid.py @@ -10,7 +10,7 @@ def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) data = httptools.downloadpage(page_url).data - if "watch " in data.lower(): + if "watch " in data.lower() or "File was deleted" in data: return False, "[kingvid] El archivo no existe o ha sido borrado" return True, "" From f9781138fd67c8a212097e7f555d708cf5e33946 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 11:49:27 -0500 Subject: [PATCH 10/21] Delete bitpor.json --- plugin.video.alfa/servers/bitpor.json | 49 --------------------------- 1 file changed, 49 deletions(-) delete mode 100644 plugin.video.alfa/servers/bitpor.json diff --git a/plugin.video.alfa/servers/bitpor.json b/plugin.video.alfa/servers/bitpor.json deleted file mode 100644 index f35bc2a7..00000000 --- a/plugin.video.alfa/servers/bitpor.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "active": true, - "changes": [ - { - "date": "18/09/2017", - "description": "Versión inicial" - } - ], - "find_videos": { - "ignore_urls": [], - "patterns": [ - { - "pattern": "https://www.bitporno.com/e/([A-z0-9]+)", - "url": "https://www.bitporno.com/e/\\1" - } - ] - }, - "free": true, - "id": "bitpor", - "name": "bitpor", - "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://s26.postimg.org/3p7nnhpah/bitpor1.png", - "version": 1 -} From 49e48060243a408a1f05b80fd0f86a6778f744d7 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 11:49:49 -0500 Subject: [PATCH 11/21] Delete bitpor.py --- plugin.video.alfa/servers/bitpor.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 plugin.video.alfa/servers/bitpor.py diff --git a/plugin.video.alfa/servers/bitpor.py b/plugin.video.alfa/servers/bitpor.py deleted file mode 100644 index f497f4fe..00000000 --- a/plugin.video.alfa/servers/bitpor.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -from core import httptools -from core import scrapertools -from platformcode import logger - - -def test_video_exists(page_url): - logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url).data - if "no longer exists" in data: - return False, "[bitpor] El fichero ha sido borrado" - - return True, "" - - -def get_video_url(page_url, user="", password="", video_password=""): - logger.info("(page_url='%s')" % page_url) - video_urls = [] - data = httptools.downloadpage(page_url).data - videourl = scrapertools.find_multiple_matches(data, 'file":"([^"]+).*?label":"([^"]+)') - scrapertools.printMatches(videourl) - for scrapedurl, scrapedquality in videourl: - scrapedurl = scrapedurl.replace("\\","") - video_urls.append([scrapedquality + " [bitpor]", scrapedurl]) - - return video_urls From 20dc367702292c490d41bee1014a315b954348db Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 11:50:43 -0500 Subject: [PATCH 12/21] Add files via upload --- plugin.video.alfa/servers/bitp.json | 49 +++++++++++++++++++++++++++++ plugin.video.alfa/servers/bitp.py | 27 ++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 plugin.video.alfa/servers/bitp.json create mode 100644 plugin.video.alfa/servers/bitp.py diff --git a/plugin.video.alfa/servers/bitp.json b/plugin.video.alfa/servers/bitp.json new file mode 100644 index 00000000..f7cb4dfa --- /dev/null +++ b/plugin.video.alfa/servers/bitp.json @@ -0,0 +1,49 @@ +{ + "active": true, + "changes": [ + { + "date": "18/09/2017", + "description": "Versión inicial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "https://www.bitporno.com/e/([A-z0-9]+)", + "url": "https://www.bitporno.com/e/\\1" + } + ] + }, + "free": true, + "id": "bitp", + "name": "bitp", + "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://s26.postimg.org/maiur9tmx/bitp1.png", + "version": 1 +} diff --git a/plugin.video.alfa/servers/bitp.py b/plugin.video.alfa/servers/bitp.py new file mode 100644 index 00000000..95a12753 --- /dev/null +++ b/plugin.video.alfa/servers/bitp.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +from core import httptools +from core import scrapertools +from platformcode import logger + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + if "no longer exists" in data: + return False, "[bitp] El fichero ha sido borrado" + + return True, "" + + +def get_video_url(page_url, user="", password="", video_password=""): + logger.info("(page_url='%s')" % page_url) + video_urls = [] + data = httptools.downloadpage(page_url).data + videourl = scrapertools.find_multiple_matches(data, 'file":"([^"]+).*?label":"([^"]+)') + scrapertools.printMatches(videourl) + for scrapedurl, scrapedquality in videourl: + scrapedurl = scrapedurl.replace("\\","") + video_urls.append([scrapedquality + " [bitp]", scrapedurl]) + + return video_urls From 204254c56441617634c22c62a0a4bb010820fbcf Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:19:02 -0500 Subject: [PATCH 13/21] Update vidlox.py --- plugin.video.alfa/servers/vidlox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/vidlox.py b/plugin.video.alfa/servers/vidlox.py index 492cd93b..6dfd69f8 100644 --- a/plugin.video.alfa/servers/vidlox.py +++ b/plugin.video.alfa/servers/vidlox.py @@ -13,7 +13,7 @@ from platformcode import logger def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) data = httptools.downloadpage(page_url).data - if "borrado" in data: + if "borrado" in data or "Deleted" in data: return False, "[vidlox] El fichero ha sido borrado" return True, "" From 0d38737fa78f2d89299ff9f52ec4d40c89befce3 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:41:36 -0500 Subject: [PATCH 14/21] Update bitp.json --- plugin.video.alfa/servers/bitp.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin.video.alfa/servers/bitp.json b/plugin.video.alfa/servers/bitp.json index f7cb4dfa..aeb7c8be 100644 --- a/plugin.video.alfa/servers/bitp.json +++ b/plugin.video.alfa/servers/bitp.json @@ -12,6 +12,10 @@ { "pattern": "https://www.bitporno.com/e/([A-z0-9]+)", "url": "https://www.bitporno.com/e/\\1" + }, + { + "pattern": "raptu.com/(?:\\?v=|embed/|e/)([A-z0-9]+)", + "url": "https://www.bitporno.com/e/\\1" } ] }, From 059fe13a8d2155445247997653f7fb528af47b3f Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:42:17 -0500 Subject: [PATCH 15/21] Update bitp.py --- plugin.video.alfa/servers/bitp.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/servers/bitp.py b/plugin.video.alfa/servers/bitp.py index 95a12753..7ca99b97 100644 --- a/plugin.video.alfa/servers/bitp.py +++ b/plugin.video.alfa/servers/bitp.py @@ -1,4 +1,9 @@ # -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Alfa addon - KODI Plugin +# Conector para bitporno +# https://github.com/alfa-addon +# ------------------------------------------------------------ from core import httptools from core import scrapertools @@ -8,8 +13,8 @@ from platformcode import logger def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) data = httptools.downloadpage(page_url).data - if "no longer exists" in data: - return False, "[bitp] El fichero ha sido borrado" + if "Object not found" in data or "no longer exists" in data or '"sources": [false]' in data: + return False, "[bitp] El archivo no existe o ha sido borrado" return True, "" @@ -21,7 +26,9 @@ def get_video_url(page_url, user="", password="", video_password=""): videourl = scrapertools.find_multiple_matches(data, 'file":"([^"]+).*?label":"([^"]+)') scrapertools.printMatches(videourl) for scrapedurl, scrapedquality in videourl: + if "loadthumb" in scrapedurl: + continue scrapedurl = scrapedurl.replace("\\","") video_urls.append([scrapedquality + " [bitp]", scrapedurl]) - + video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0])) return video_urls From 09ea4734bbe2c6575a70674747e4d904873f14f0 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:42:38 -0500 Subject: [PATCH 16/21] Delete raptu.json --- plugin.video.alfa/servers/raptu.json | 53 ---------------------------- 1 file changed, 53 deletions(-) delete mode 100755 plugin.video.alfa/servers/raptu.json diff --git a/plugin.video.alfa/servers/raptu.json b/plugin.video.alfa/servers/raptu.json deleted file mode 100755 index 088063bd..00000000 --- a/plugin.video.alfa/servers/raptu.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "active": true, - "changes": [ - { - "date": "09/05/2017", - "description": "Agregado otro tipo de url de los videos y detección de subtítulos" - }, - { - "date": "16/02/2017", - "description": "Primera versión" - } - ], - "find_videos": { - "ignore_urls": [], - "patterns": [ - { - "pattern": "raptu.com/(?:\\?v=|embed/|e/)([A-z0-9]+)", - "url": "https://raptu.com/embed/\\1" - } - ] - }, - "free": true, - "id": "raptu", - "name": "raptu", - "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": "http://i.imgur.com/quVK1j0.png?1", - "version": 1 -} \ No newline at end of file From 1b6f3e172ae7fa9cefb6c00cd0856294acfb732d Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:42:51 -0500 Subject: [PATCH 17/21] Delete raptu.py --- plugin.video.alfa/servers/raptu.py | 53 ------------------------------ 1 file changed, 53 deletions(-) delete mode 100755 plugin.video.alfa/servers/raptu.py diff --git a/plugin.video.alfa/servers/raptu.py b/plugin.video.alfa/servers/raptu.py deleted file mode 100755 index d833e279..00000000 --- a/plugin.video.alfa/servers/raptu.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -from core import httptools -from core import scrapertools -from platformcode import logger - - -def test_video_exists(page_url): - logger.info("(page_url='%s')" % page_url) - try: - response = httptools.downloadpage(page_url) - except: - pass - - if not response.data or "urlopen error [Errno 1]" in str(response.code): - from platformcode import config - if config.is_xbmc(): - return False, "[Raptu] Este conector solo funciona a partir de Kodi 17" - elif config.get_platform() == "plex": - return False, "[Raptu] Este conector no funciona con tu versión de Plex, intenta actualizarla" - elif config.get_platform() == "mediaserver": - return False, "[Raptu] Este conector requiere actualizar python a la versión 2.7.9 o superior" - - if "Object not found" in response.data: - return False, "[Raptu] El archivo no existe o ha sido borrado" - - return True, "" - - -def get_video_url(page_url, premium=False, user="", password="", video_password=""): - logger.info("(page_url='%s')" % page_url) - - data = httptools.downloadpage(page_url).data - video_urls = [] - # Detección de subtítulos - subtitulo = "" - videos = scrapertools.find_multiple_matches(data, '"file"\s*:\s*"([^"]+)","label"\s*:\s*"([^"]+)"') - for video_url, calidad in videos: - video_url = video_url.replace("\\", "") - extension = scrapertools.get_filename_from_url(video_url)[-4:] - if ".srt" in extension: - subtitulo = "https://www.raptu.com" + video_url - else: - video_urls.append(["%s %s [raptu]" % (extension, calidad), video_url, 0, subtitulo]) - - try: - video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0].rsplit(" ")[1])) - except: - pass - for video_url in video_urls: - logger.info(" %s - %s" % (video_url[0], video_url[1])) - - return video_urls From e4455b575429bcbffa49600635cec0485f73d774 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:47:00 -0500 Subject: [PATCH 18/21] Update peliculasrey.py --- plugin.video.alfa/channels/peliculasrey.py | 34 +++++++++++++++------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index 4f66d450..f894f870 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -151,8 +151,15 @@ def peliculas(item): itemlist = [] for scrapedthumbnail, scrapedtitle, scrapedurl in matches: - itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, url=scrapedurl, - thumbnail=scrapedthumbnail, plot="", fulltitle=scrapedtitle)) + fulltitle = scrapedtitle.replace(scrapertools.find_single_match(scrapedtitle, '\([0-9]+\)' ), "") + itemlist.append(Item(channel = item.channel, + action = "findvideos", + title = scrapedtitle, + url = scrapedurl, + thumbnail = scrapedthumbnail, + plot = "", + fulltitle = fulltitle + )) next_page = scrapertools.find_single_match(data, 'rel="next" href="([^"]+)') if next_page != "": @@ -170,15 +177,15 @@ def findvideos(item): patron = 'hand" rel="([^"]+).*?title="(.*?)".*?([^<]+).*?(.*?)<' matches = re.compile(patron, re.DOTALL).findall(data) itemlist = [] + encontrados = [] itemtemp = [] for scrapedurl, server_name, language, quality in matches: + if scrapedurl in encontrados: + continue + encontrados.append(scrapedurl) language = language.strip() quality = quality.strip() - if server_name.lower() in ["youapihd","drive"]: - server_name = "gvideo" - if server_name.lower() in ["tvad"]: - server_name = "thevideome" if "pelismundo" in scrapedurl: data = httptools.downloadpage(scrapedurl, add_referer = True).data patron = 'sources.*?}],' @@ -192,10 +199,10 @@ def findvideos(item): itemlist.append(Item(channel = item.channel, action = "play", extra = "hdvids", - fulltitle = item.title, + fulltitle = item.fulltitle, server = "directo", thumbnail = item.thumbnail, - title = server_name + " (" + language + ") (" + videoitem[0] + ")", + title = "%s (" + language + ") (" + videoitem[0] + ")", url = videoitem[1], language = language, quality = videoitem[0] @@ -204,13 +211,18 @@ def findvideos(item): itemlist.append(Item(channel=item.channel, action = "play", extra = "", - fulltitle = item.title, - title = server_name + " (" + language + ") (" + quality + ")", + fulltitle = item.fulltitle, + title = "%s (" + language + ") (" + quality + ")", thumbnail = item.thumbnail, url = scrapedurl, folder = False, language = language, quality = quality )) - itemlist = servertools.get_servers_itemlist(itemlist) + itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) return itemlist + + +def play(item): + item.thumbnail = item.contentThumbnail + return [item] From 9718505699e24dbe050d26e9d6c905fda5bd3122 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 12:55:28 -0500 Subject: [PATCH 19/21] Update streamcherry.py --- plugin.video.alfa/servers/streamcherry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/streamcherry.py b/plugin.video.alfa/servers/streamcherry.py index 61b3c28b..5aa5f7e0 100644 --- a/plugin.video.alfa/servers/streamcherry.py +++ b/plugin.video.alfa/servers/streamcherry.py @@ -35,7 +35,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= if not media_url.startswith("http"): media_url = "http:" + media_url - video_urls.append([".%s %sp [streamango]" % (ext, quality), media_url]) + video_urls.append([".%s %sp [streamcherry]" % (ext, quality), media_url]) video_urls.reverse() for video_url in video_urls: From b3b704357cbbd231679add4f6eb364c605ca4dae Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 16:17:06 -0500 Subject: [PATCH 20/21] Add files via upload --- plugin.video.alfa/servers/pelismundo.json | 49 +++++++++++++++++++++++ plugin.video.alfa/servers/pelismundo.py | 33 +++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 plugin.video.alfa/servers/pelismundo.json create mode 100644 plugin.video.alfa/servers/pelismundo.py diff --git a/plugin.video.alfa/servers/pelismundo.json b/plugin.video.alfa/servers/pelismundo.json new file mode 100644 index 00000000..1d9e3395 --- /dev/null +++ b/plugin.video.alfa/servers/pelismundo.json @@ -0,0 +1,49 @@ +{ + "active": true, + "changes": [ + { + "date": "18/09/2017", + "description": "Versión inicial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "http://www.pelismundo.com/gkvip/vip/playervip3/.*?id=([A-z0-9]+)", + "url": "http://www.pelismundo.com/gkvip/vip/playervip3/player.php?id=\\1" + } + ] + }, + "free": true, + "id": "pelismundo", + "name": "pelismundo", + "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://s26.postimg.org/72c9mr3ux/pelismundo1.png", + "version": 1 +} diff --git a/plugin.video.alfa/servers/pelismundo.py b/plugin.video.alfa/servers/pelismundo.py new file mode 100644 index 00000000..c86ad7f3 --- /dev/null +++ b/plugin.video.alfa/servers/pelismundo.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Alfa addon - KODI Plugin +# Conector para pelismundo +# https://github.com/alfa-addon +# ------------------------------------------------------------ + +from core import httptools +from core import scrapertools +from platformcode import logger + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + if "Object not found" in data or "no longer exists" in data or '"sources": [false]' in data: + return False, "[pelismundo] El archivo no existe o ha sido borrado" + + return True, "" + + +def get_video_url(page_url, user="", password="", video_password=""): + logger.info("(page_url='%s')" % page_url) + video_urls = [] + data = httptools.downloadpage(page_url, add_referer = True).data + patron = 'sources.*?}],' + bloque = scrapertools.find_single_match(data, patron) + patron = 'file.*?"([^"]+)".*?label:"([^"]+)"' + match = scrapertools.find_multiple_matches(bloque, patron) + for scrapedurl, scrapedquality in match: + video_urls.append([scrapedquality + " [pelismundo]", scrapedurl]) + #video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0])) + return video_urls From fd0aa797fefc9505afd2773bb1e41e29d1a24abb Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 18 Sep 2017 16:37:45 -0500 Subject: [PATCH 21/21] Update peliculasrey.py --- plugin.video.alfa/channels/peliculasrey.py | 44 ++++++---------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index f894f870..aae92931 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -186,39 +186,17 @@ def findvideos(item): encontrados.append(scrapedurl) language = language.strip() quality = quality.strip() - if "pelismundo" in scrapedurl: - data = httptools.downloadpage(scrapedurl, add_referer = True).data - patron = 'sources.*?}],' - bloque = scrapertools.find_single_match(data, patron) - patron = 'file.*?"([^"]+)".*?label:"([^"]+)"' - match = scrapertools.find_multiple_matches(bloque, patron) - for scrapedurl1, scrapedlabel1 in match: - itemtemp.append([scrapedlabel1, scrapedurl1]) - itemtemp.sort(key=lambda it: int(it[0].replace("p", ""))) - for videoitem in itemtemp: - itemlist.append(Item(channel = item.channel, - action = "play", - extra = "hdvids", - fulltitle = item.fulltitle, - server = "directo", - thumbnail = item.thumbnail, - title = "%s (" + language + ") (" + videoitem[0] + ")", - url = videoitem[1], - language = language, - quality = videoitem[0] - )) - else: - itemlist.append(Item(channel=item.channel, - action = "play", - extra = "", - fulltitle = item.fulltitle, - title = "%s (" + language + ") (" + quality + ")", - thumbnail = item.thumbnail, - url = scrapedurl, - folder = False, - language = language, - quality = quality - )) + itemlist.append(Item(channel=item.channel, + action = "play", + extra = "", + fulltitle = item.fulltitle, + title = "%s (" + language + ") (" + quality + ")", + thumbnail = item.thumbnail, + url = scrapedurl, + folder = False, + language = language, + quality = quality + )) itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) return itemlist