KoD 0.8.1

- riorganizzate le impostazioni
- aggiunte descrizioni tag qualità su cb01 (presto anche sugli altri)
- aggiunto il supporto alle serie di polpotv
- fixato server mystream
- fix Rinumerazione per episodi Nuovi
This commit is contained in:
marco
2020-03-14 17:03:57 +01:00
parent c642ddc358
commit 3cdedad7e8
413 changed files with 10944 additions and 1540 deletions
Regular → Executable
+17 -25
View File
@@ -2,6 +2,7 @@
from core import httptools
from core import scrapertools
from lib import jsunpack
from platformcode import logger
@@ -10,7 +11,7 @@ def test_video_exists(page_url):
data = httptools.downloadpage(page_url).data
if 'File Not Found' in data or '404 Not Found' in data:
if 'Not Found' in data or 'File is no longer available' in data:
return False, "[Datoporn] El archivo no existe o ha sido borrado"
return True, ""
@@ -18,38 +19,29 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
media_urls = scrapertools.find_multiple_matches(data, 'src: "([^"]+)",.*?label: "([^"]+)"')
#media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
# if not media_urls:
# match = scrapertools.find_single_match(data, "p,a,c,k(.*?)</script>")
# try:
# data = jsunpack.unpack(match)
# except:
# pass
# media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
# Extrae la URL
calidades = []
video_urls = []
for media_url in sorted(media_urls, key=lambda x: int(x[1][-3:])):
calidades.append(int(media_url[1][-3:]))
if not media_urls:
match = scrapertools.find_single_match(data, "<script type='text/javascript'>(eval.function.p,a,c,k,e,d..*?)</script>")
try:
title = ".%s %sp [datoporn]" % (media_url[0].rsplit('.', 1)[1], media_url[1][-3:])
data = jsunpack.unpack(match)
except:
title = ".%s %sp [datoporn]" % (media_url[-4:], media_url[1][-3:])
video_urls.append([title, media_url[0]])
sorted(calidades)
m3u8 = scrapertools.find_single_match(data, 'file\:"([^"]+\.m3u8)"')
pass
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
# Extrae la URL
for media_url, res in media_urls:
try:
title = ".%s %s [datoporn]" % (media_url.rsplit('.', 1)[1], res)
except:
title = ".%s %s [datoporn]" % (media_url[-4:], res)
video_urls.append([title, media_url])
m3u8 = scrapertools.find_single_match(data, 'src\:"([^"]+\.m3u8)"')
if not m3u8:
m3u8 = str(scrapertools.find_multiple_matches(data, 'player.updateSrc\({src:.?"([^"]+\.m3u8)"')).replace("['", "").replace("']", "")
calidades = ['720p']
if m3u8:
video_urls.insert(0, [".m3u8 %s [datoporn]" % calidades[-1], m3u8])
video_urls.insert(0, [".m3u8 720p [datoporn]" , m3u8])
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))
return video_urls