')
+ matches = scrapertools.find_multiple_matches(bloque_calidad, '(.*?) ')
+ for key1, key2 in matches:
+ indice_calidad[key1] = key2
+
+ return indice_genero, indice_alfa, indice_idioma, indice_year, indice_calidad
diff --git a/plugin.video.alfa/channels/alltorrent.json b/plugin.video.alfa/channels/alltorrent.json
new file mode 100755
index 00000000..18564066
--- /dev/null
+++ b/plugin.video.alfa/channels/alltorrent.json
@@ -0,0 +1,37 @@
+{
+ "id": "alltorrent",
+ "name": "Alltorrent",
+ "active": true,
+ "adult": false,
+ "language": "es",
+ "thumbnail": "http://imgur.com/sLaXHvp.png",
+ "version": 1,
+ "changes": [
+ {
+ "date": "26/04/2017",
+ "description": "Release"
+ }
+ ],
+ "categories": [
+ "torrent",
+ "movie"
+ ],
+ "settings": [
+ {
+ "id": "modo_grafico",
+ "type": "bool",
+ "label": "Buscar información extra",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "include_in_global_search",
+ "type": "bool",
+ "label": "Incluir en busqueda global",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/plugin.video.alfa/channels/alltorrent.py b/plugin.video.alfa/channels/alltorrent.py
new file mode 100755
index 00000000..8f662aca
--- /dev/null
+++ b/plugin.video.alfa/channels/alltorrent.py
@@ -0,0 +1,395 @@
+# -*- coding: utf-8 -*-
+
+import os
+import re
+import unicodedata
+from threading import Thread
+
+from core import config
+from core import httptools
+from core import logger
+from core import scrapertools
+from core import servertools
+from core import tmdb
+from core.item import Item
+
+__modo_grafico__ = config.get_setting('modo_grafico', "ver-pelis")
+
+
+# Para la busqueda en bing evitando baneos
+
+
+def browser(url):
+ import mechanize
+
+ # Utilizamos Browser mechanize para saltar problemas con la busqueda en bing
+ br = mechanize.Browser()
+ # Browser options
+ br.set_handle_equiv(False)
+ br.set_handle_gzip(True)
+ br.set_handle_redirect(True)
+ br.set_handle_referer(False)
+ br.set_handle_robots(False)
+ # Follows refresh 0 but not hangs on refresh > 0
+ br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
+ # Want debugging messages?
+ # br.set_debug_http(True)
+ # br.set_debug_redirects(True)
+ # br.set_debug_responses(True)
+
+ # User-Agent (this is cheating, ok?)
+ # br.addheaders = [('User-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/7.1.7 Safari/537.85.16')]
+ # br.addheaders =[('Cookie','SRCHD=AF=QBRE; domain=.bing.com; expires=25 de febrero de 2018 13:00:28 GMT+1; MUIDB=3B942052D204686335322894D3086911; domain=www.bing.com;expires=24 de febrero de 2018 13:00:28 GMT+1')]
+ # Open some site, let's pick a random one, the first that pops in mind
+ r = br.open(url)
+ response = r.read()
+ print response
+ if "img,divreturn" in response:
+ r = br.open("http://ssl-proxy.my-addr.org/myaddrproxy.php/" + url)
+ print "prooooxy"
+ response = r.read()
+
+ return response
+
+
+api_key = "2e2160006592024ba87ccdf78c28f49f"
+api_fankey = "dffe90fba4d02c199ae7a9e71330c987"
+
+
+def mainlist(item):
+ logger.info()
+ itemlist = []
+ i = 0
+ global i
+ itemlist.append(item.clone(title="[COLOR springgreen][B]Todas Las Películas[/B][/COLOR]", action="scraper",
+ url="http://alltorrent.net/", thumbnail="http://imgur.com/XLqPZoF.png",
+ fanart="http://imgur.com/v3ChkZu.jpg", contentType="movie"))
+ itemlist.append(item.clone(title="[COLOR springgreen] Incluyen 1080p[/COLOR]", action="scraper",
+ url="http://alltorrent.net/rezolucia/1080p/", thumbnail="http://imgur.com/XLqPZoF.png",
+ fanart="http://imgur.com/v3ChkZu.jpg", contentType="movie"))
+ itemlist.append(item.clone(title="[COLOR springgreen] Incluyen 720p[/COLOR]", action="scraper",
+ url="http://alltorrent.net/rezolucia/720p/", thumbnail="http://imgur.com/XLqPZoF.png",
+ fanart="http://imgur.com/v3ChkZu.jpg", contentType="movie"))
+ itemlist.append(item.clone(title="[COLOR springgreen] Incluyen Hdrip[/COLOR]", action="scraper",
+ url="http://alltorrent.net/rezolucia/hdrip/", thumbnail="http://imgur.com/XLqPZoF.png",
+ fanart="http://imgur.com/v3ChkZu.jpg", contentType="movie"))
+ itemlist.append(item.clone(title="[COLOR springgreen] Incluyen 3D[/COLOR]", action="scraper",
+ url="http://alltorrent.net/rezolucia/3d/", thumbnail="http://imgur.com/XLqPZoF.png",
+ fanart="http://imgur.com/v3ChkZu.jpg", contentType="movie"))
+ itemlist.append(itemlist[-1].clone(title="[COLOR floralwhite][B]Buscar[/B][/COLOR]", action="search",
+ thumbnail="http://imgur.com/5EBwccS.png", fanart="http://imgur.com/v3ChkZu.jpg",
+ contentType="movie", extra="titulo"))
+ itemlist.append(itemlist[-1].clone(title="[COLOR oldlace] Por Título[/COLOR]", action="search",
+ thumbnail="http://imgur.com/5EBwccS.png", fanart="http://imgur.com/v3ChkZu.jpg",
+ contentType="movie", extra="titulo"))
+ itemlist.append(itemlist[-1].clone(title="[COLOR oldlace] Por Año[/COLOR]", action="search",
+ thumbnail="http://imgur.com/5EBwccS.png", fanart="http://imgur.com/v3ChkZu.jpg",
+ contentType="movie", extra="año"))
+ itemlist.append(itemlist[-1].clone(title="[COLOR oldlace] Por Rating Imdb[/COLOR]", action="search",
+ thumbnail="http://imgur.com/5EBwccS.png", fanart="http://imgur.com/v3ChkZu.jpg",
+ contentType="movie", extra="rating"))
+
+ return itemlist
+
+
+def search(item, texto):
+ logger.info()
+ texto = texto.replace(" ", "+")
+ if item.extra == "titulo":
+ item.url = "http://alltorrent.net/?s=" + texto
+
+ elif item.extra == "año":
+ item.url = "http://alltorrent.net/weli/" + texto
+ else:
+ item.url = "http://alltorrent.net/imdb/" + texto
+ if texto != '':
+ return scraper(item)
+
+
+def scraper(item):
+ logger.info()
+ itemlist = []
+
+ data = httptools.downloadpage(item.url).data
+ data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
+ patron = scrapertools.find_multiple_matches(data,
+ '' % item.extra
+ data = scrapertools.find_single_match(data, patron)
+ matches = re.compile(']+>(.*?) ', re.DOTALL).findall(data)
+
+ for url, title in matches:
+ url = "%s/nombre/lista" % url
+ itemlist.append(Item(channel=item.channel, action="listado", title=title, url=url,
+ context=renumbertools.context(item)))
+
+ return itemlist
+
+
+def newest(categoria):
+ itemlist = []
+
+ if categoria == 'anime':
+ itemlist = novedades_episodios(Item(url=HOST))
+
+ return itemlist
+
+
+def novedades_episodios(item):
+ logger.info()
+
+ data = httptools.downloadpage(item.url).data
+ data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
+ data = scrapertools.find_single_match(data, ']+>.+? (.*?)