Cambio dominio estrenosgo y server gvideo

This commit is contained in:
pipcat
2018-08-07 15:57:43 +02:00
parent d423630999
commit b2d3692f7f
2 changed files with 17 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ from core import tmdb
from core.item import Item
from platformcode import config, logger
HOST = 'http://estrenosli.org/'
HOST = 'http://estrenosby.net/' # 'http://estrenosli.org/'
parameters = channeltools.get_channel_parameters('estrenosgo')
fanart_host = parameters['fanart']
thumbnail_host = parameters['thumbnail']
@@ -138,7 +138,7 @@ def findvideos(item):
list_opciones = []
IDIOMAS = {"banderita1": "Español", "banderita2": "VOSE", "banderita3": "Latino"}
url = "http://estrenosli.org/ver-online-" + item.url
url = HOST + "ver-online-" + item.url
data = httptools.downloadpage(url).data
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)

View File

@@ -8,6 +8,8 @@ from platformcode import logger
def test_video_exists(page_url):
if 'googleusercontent' in page_url:
return True, "" # desactivada verificación pq se encalla!
response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url})
if "no+existe" in response.data:
@@ -34,13 +36,19 @@ def get_video_url(page_url, user="", password="", video_password=""):
response = httptools.downloadpage(page_url, follow_redirects = False, cookies=False, headers={"Referer": page_url})
url=response.headers['location']
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
if "set-cookie" in response.headers:
try:
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
except:
headers_string = ""
else:
headers_string = ""
quality = scrapertools.find_single_match (url, '.itag=(\d+).')