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:
23
servers/drtuber.py
Normal file
23
servers/drtuber.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
|
||||
def get_video_url(page_url, video_password):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
url = "https://www.drtuber.com/player_config_json/?vid=%s&aid=0&domain_id=0&embed=0&ref=null&check_speed=0" %page_url
|
||||
data = httptools.downloadpage(url).data
|
||||
data = scrapertools.find_single_match(data, '"files":(.*?)"quality"')
|
||||
patron = '"([lh])q":"([^"]+)"'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for quality, scrapedurl in matches:
|
||||
url = scrapedurl.replace("\/", "/")
|
||||
if "l" in quality: quality = "360"
|
||||
if "h" in quality: quality = "720"
|
||||
video_urls.append(["[drtuber] %s" %quality, url])
|
||||
return video_urls
|
||||
|
||||
Reference in New Issue
Block a user