From 58fe78caa3508b244a44cd79072b4f70b7751d85 Mon Sep 17 00:00:00 2001 From: shlibidon <39755626+shlibidon@users.noreply.github.com> Date: Mon, 8 Apr 2019 19:30:08 +0200 Subject: [PATCH] gamovideo: fix --- plugin.video.alfa/servers/gamovideo.json | 4 ++-- plugin.video.alfa/servers/gamovideo.py | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/plugin.video.alfa/servers/gamovideo.json b/plugin.video.alfa/servers/gamovideo.json index 46a93854..1ebc6814 100755 --- a/plugin.video.alfa/servers/gamovideo.json +++ b/plugin.video.alfa/servers/gamovideo.json @@ -5,7 +5,7 @@ "patterns": [ { "pattern": "gamovideo.com/(?:embed-|)([a-z0-9]+)", - "url": "http://gamovideo.com/embed-\\1.html" + "url": "http://gamovideo.com/\\1" } ] }, @@ -39,4 +39,4 @@ } ], "thumbnail": "server_gamovideo.png" -} \ No newline at end of file +} diff --git a/plugin.video.alfa/servers/gamovideo.py b/plugin.video.alfa/servers/gamovideo.py index 8a5c6e7d..d22255f1 100755 --- a/plugin.video.alfa/servers/gamovideo.py +++ b/plugin.video.alfa/servers/gamovideo.py @@ -7,17 +7,14 @@ from core import scrapertools from lib import jsunpack from platformcode import logger -headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"} +headers = {"User-Agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0"} def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url) - if data.code==404: - data = httptools.downloadpage(page_url, headers=headers, add_referer=True) - data = data.data + data = httptools.downloadpage(page_url, headers=headers, cookies=False).data - if "File was deleted" in data or "Not Found" in data or "File was locked by administrator" in data: + if "File was deleted" in data or "