diff --git a/src/you_get/common.py b/src/you_get/common.py index 137c4933..1d1088da 100755 --- a/src/you_get/common.py +++ b/src/you_get/common.py @@ -37,13 +37,11 @@ SITES = { 'cbs' : 'cbs', 'coub' : 'coub', 'dailymotion' : 'dailymotion', - 'dilidili' : 'dilidili', 'douban' : 'douban', 'douyin' : 'douyin', 'douyu' : 'douyutv', 'ehow' : 'ehow', 'facebook' : 'facebook', - 'fantasy' : 'fantasy', 'fc2' : 'fc2video', 'flickr' : 'flickr', 'freesound' : 'freesound', @@ -51,7 +49,6 @@ SITES = { 'google' : 'google', 'giphy' : 'giphy', 'heavy-music' : 'heavymusic', - 'huaban' : 'huaban', 'huomao' : 'huomaotv', 'iask' : 'sina', 'icourses' : 'icourses', @@ -94,7 +91,6 @@ SITES = { 'pptv' : 'pptv', 'qingting' : 'qingting', 'qq' : 'qq', - 'quanmin' : 'quanmin', 'showroom-live' : 'showroom', 'sina' : 'sina', 'smgbb' : 'bilibili', diff --git a/src/you_get/extractors/__init__.py b/src/you_get/extractors/__init__.py index d2c4c7b7..0c4cccc7 100755 --- a/src/you_get/extractors/__init__.py +++ b/src/you_get/extractors/__init__.py @@ -13,20 +13,17 @@ from .ckplayer import * from .cntv import * from .coub import * from .dailymotion import * -from .dilidili import * from .douban import * from .douyin import * from .douyutv import * from .ehow import * from .facebook import * -from .fantasy import * from .fc2video import * from .flickr import * from .freesound import * from .funshion import * from .google import * from .heavymusic import * -from .huaban import * from .icourses import * from .ifeng import * from .imgur import * diff --git a/src/you_get/extractors/dilidili.py b/src/you_get/extractors/dilidili.py deleted file mode 100644 index f7b5922d..00000000 --- a/src/you_get/extractors/dilidili.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python - -__all__ = ['dilidili_download'] - -from ..common import * -from .ckplayer import ckplayer_download - -headers = { - 'DNT': '1', - 'Accept-Encoding': 'gzip, deflate, sdch, br', - 'Accept-Language': 'en-CA,en;q=0.8,en-US;q=0.6,zh-CN;q=0.4,zh;q=0.2', - 'Upgrade-Insecure-Requests': '1', - 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36', - 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', - 'Cache-Control': 'max-age=0', - 'Referer': 'http://www.dilidili.com/', - 'Connection': 'keep-alive', - 'Save-Data': 'on', -} - -#---------------------------------------------------------------------- -def dilidili_parser_data_to_stream_types(typ ,vid ,hd2 ,sign, tmsign, ulk): - """->list""" - another_url = 'https://newplayer.jfrft.com/parse.php?xmlurl=null&type={typ}&vid={vid}&hd={hd2}&sign={sign}&tmsign={tmsign}&userlink={ulk}'.format(typ = typ, vid = vid, hd2 = hd2, sign = sign, tmsign = tmsign, ulk = ulk) - parse_url = 'http://player.005.tv/parse.php?xmlurl=null&type={typ}&vid={vid}&hd={hd2}&sign={sign}&tmsign={tmsign}&userlink={ulk}'.format(typ = typ, vid = vid, hd2 = hd2, sign = sign, tmsign = tmsign, ulk = ulk) - html = get_content(another_url, headers=headers) - - info = re.search(r'(\{[^{]+\})(\{[^{]+\})(\{[^{]+\})(\{[^{]+\})(\{[^{]+\})', html).groups() - info = [i.strip('{}').split('->') for i in info] - info = {i[0]: i [1] for i in info} - - stream_types = [] - for i in zip(info['deft'].split('|'), info['defa'].split('|')): - stream_types.append({'id': str(i[1][-1]), 'container': 'mp4', 'video_profile': i[0]}) - return stream_types - -#---------------------------------------------------------------------- -def dilidili_download(url, output_dir = '.', merge = False, info_only = False, **kwargs): - global headers - re_str = r'http://www.dilidili.com/watch\S+' - if re.match(r'http://www.dilidili.wang', url): - re_str = r'http://www.dilidili.wang/watch\S+' - headers['Referer'] = 'http://www.dilidili.wang/' - elif re.match(r'http://www.dilidili.mobi', url): - re_str = r'http://www.dilidili.mobi/watch\S+' - headers['Referer'] = 'http://www.dilidili.mobi/' - - if re.match(re_str, url): - html = get_content(url) - title = match1(html, r'