diff --git a/plugin.video.alfa/channels/hdfull.py b/plugin.video.alfa/channels/hdfull.py index 9e4ad2f1..6dfb8b2c 100644 --- a/plugin.video.alfa/channels/hdfull.py +++ b/plugin.video.alfa/channels/hdfull.py @@ -15,6 +15,7 @@ from platformcode import platformtools host = "http://hdfull.tv" +A_A = {'User-Agent':'Mozilla/5.0 AppLeWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 SaFAri/537.36'} if config.get_setting('hdfulluser', 'hdfull'): account = True else: @@ -28,7 +29,7 @@ def settingCanal(item): def login(): logger.info() - data = agrupa_datos(httptools.downloadpage(host).data) + data = agrupa_datos(httptools.downloadpage(host, headers=A_A).data) patron = "" sid = scrapertools.find_single_match(data, patron) @@ -37,7 +38,7 @@ def login(): 'hdfull') + "&password=" + config.get_setting( 'hdfullpassword', 'hdfull') + "&action=login" - httptools.downloadpage(host, post=post) + httptools.downloadpage(host, post=post, headers=A_A) def mainlist(item): @@ -137,7 +138,7 @@ def menuseries(item): def search(item, texto): logger.info() - data = agrupa_datos(httptools.downloadpage(host).data) + data = agrupa_datos(httptools.downloadpage(host, headers=A_A).data) sid = scrapertools.get_match(data, '.__csrf_magic. value="(sid:[^"]+)"') item.extra = urllib.urlencode({'__csrf_magic': sid}) + '&menu=search&query=' + texto @@ -173,7 +174,7 @@ def items_usuario(item): itemlist = [] ## Carga estados - status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data) + status = jsontools.load(httptools.downloadpage(host + '/a/status/all', headers=A_A).data) ## Fichas usuario url = item.url.split("?")[0] @@ -187,7 +188,7 @@ def items_usuario(item): next_page = url + "?" + post ## Carga las fichas de usuario - data = httptools.downloadpage(url, post=post).data + data = httptools.downloadpage(url, post=post, headers=A_A).data fichas_usuario = jsontools.load(data) for ficha in fichas_usuario: @@ -255,7 +256,7 @@ def listado_series(item): itemlist = [] - data = agrupa_datos(httptools.downloadpage(item.url).data) + data = agrupa_datos(httptools.downloadpage(item.url, headers=A_A).data) patron = '
' matches = re.compile(patron, re.DOTALL).findall(data) @@ -275,10 +276,10 @@ def fichas(item): textoidiomas='' infoLabels=dict() ## Carga estados - status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data) + status = jsontools.load(httptools.downloadpage(host + '/a/status/all', headers=A_A).data) if item.title == "Buscar...": - data = agrupa_datos(httptools.downloadpage(item.url, post=item.extra).data) + data = agrupa_datos(httptools.downloadpage(item.url, post=item.extra, headers=A_A).data) s_p = scrapertools.get_match(data, '