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

19
servers/yourupload.py Normal file → Executable file
View File

@@ -7,9 +7,10 @@ from platformcode import logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
global data
data = httptools.downloadpage(page_url).data
if "File was deleted" in data or "File not found" in data:
if "File was deleted" in data or "File not found" in data or 'og:video">' in data:
return False, "[Yourupload] El archivo no existe o ha sido borrado"
return True, ""
@@ -18,26 +19,26 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
url1 = httptools.downloadpage(page_url, follow_redirects=False, only_headers=True).headers.get("location", "")
referer = {'Referer': page_url}
url = scrapertools.find_single_match(data, '<meta property="og:video" content="([^"]+)"')
if not url:
if "download" in page_url:
url = httptools.downloadpage("https:" + url1, headers=referer, follow_redirects=False, only_headers=True).headers.get("location", "")
patron = 'class="btn btn-success" href="([^"]+)"'
url = scrapertools.find_single_match(data, patron).replace('amp;', '')
else:
url = scrapertools.find_single_match(data, "file:\s*'([^']+)'")
if url:
if "vidcache" not in url:
url = "https://www.yourupload.com%s" % url
location = httptools.downloadpage(url, headers=referer, follow_redirects=False, only_headers=True)
media_url = location.headers["location"].replace("?start=0", "").replace("https", "http")
media_url = httptools.downloadpage(url, headers=referer, only_headers=True).url
ext = media_url[-4:]
media_url += "|Referer=%s" % url
else:
ext = url[-4:]
media_url = url +"|Referer=%s" % page_url
video_urls.append([ext + " [yourupload]", media_url])
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))
return video_urls