aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-07-19 03:57:36 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-07-19 03:57:36 +0800
commit4b0f45f6675f13c8226ddcef8d1a77ef7739e54a (patch)
tree8ea80ea20980d9926984e09eeab3fa345a91d09d
parent826a7da808448932d17c09a13a106d75ba0c10d7 (diff)
parent36068ae019138710a3023334db2241ec815e2fe6 (diff)
downloadyoutube-dl-4b0f45f6675f13c8226ddcef8d1a77ef7739e54a.tar.xz
Merge branch 'sceext2-fix-iqiyi-2015-07-17'
-rw-r--r--youtube_dl/extractor/iqiyi.py31
1 files changed, 2 insertions, 29 deletions
diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.py
index 0f6707d7c..d93b0867d 100644
--- a/youtube_dl/extractor/iqiyi.py
+++ b/youtube_dl/extractor/iqiyi.py
@@ -3,19 +3,13 @@ from __future__ import unicode_literals
import hashlib
import math
-import os.path
import random
-import re
import time
import uuid
-import zlib
from .common import InfoExtractor
from ..compat import compat_urllib_parse
-from ..utils import (
- ExtractorError,
- url_basename,
-)
+from ..utils import ExtractorError
class IqiyiIE(InfoExtractor):
@@ -39,56 +33,48 @@ class IqiyiIE(InfoExtractor):
'title': '名侦探柯南第752集',
},
'playlist': [{
- 'md5': '7e49376fecaffa115d951634917fe105',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part1',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': '41b75ba13bb7ac0e411131f92bc4f6ca',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part2',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': '0cee1dd0a3d46a83e71e2badeae2aab0',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part3',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': '4f8ad72373b0c491b582e7c196b0b1f9',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part4',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': 'd89ad028bcfad282918e8098e811711d',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part5',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': '9cb1e5c95da25dff0660c32ae50903b7',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part6',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': '155116e0ff1867bbc9b98df294faabc9',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part7',
'ext': 'f4v',
'title': '名侦探柯南第752集',
},
}, {
- 'md5': '53f5db77622ae14fa493ed2a278a082b',
'info_dict': {
'id': 'e3f585b550a280af23c98b6cb2be19fb_part8',
'ext': 'f4v',
@@ -212,20 +198,7 @@ class IqiyiIE(InfoExtractor):
return raw_data
def get_enc_key(self, swf_url, video_id):
- filename, _ = os.path.splitext(url_basename(swf_url))
- enc_key_json = self._downloader.cache.load('iqiyi-enc-key', filename)
- if enc_key_json is not None:
- return enc_key_json[0]
-
- req = self._request_webpage(
- swf_url, video_id, note='download swf content')
- cn = req.read()
- cn = zlib.decompress(cn[8:])
- pt = re.compile(b'MixerRemote\x08(?P<enc_key>.+?)\$&vv')
- enc_key = self._search_regex(pt, cn, 'enc_key').decode('utf8')
-
- self._downloader.cache.store('iqiyi-enc-key', filename, [enc_key])
-
+ enc_key = '8e29ab5666d041c3a1ea76e06dabdffb'
return enc_key
def _real_extract(self, url):