projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b0e899
)
[Sohu] Fix title extraction
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 19 Apr 2015 11:19:44 +0000
(19:19 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 19 Apr 2015 11:19:44 +0000
(19:19 +0800)
youtube_dl/extractor/sohu.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/sohu.py
b/youtube_dl/extractor/sohu.py
index 11edf616ac8a781f0765cec94a7e49b2cb07c32c..f8a4840f7b210d0092154a0910188a22efd9bf8b 100644
(file)
--- a/
youtube_dl/extractor/sohu.py
+++ b/
youtube_dl/extractor/sohu.py
@@
-47,6
+47,7
@@
class SohuIE(InfoExtractor):
'url': 'http://my.tv.sohu.com/pl/8384802/78910339.shtml',
'info_dict': {
'id': '78910339',
'url': 'http://my.tv.sohu.com/pl/8384802/78910339.shtml',
'info_dict': {
'id': '78910339',
+ 'title': '【神探苍实战秘籍】第13期 战争之影 赫卡里姆',
},
'playlist': [{
'md5': 'bdbfb8f39924725e6589c146bc1883ad',
},
'playlist': [{
'md5': 'bdbfb8f39924725e6589c146bc1883ad',
@@
-110,7
+111,7
@@
class SohuIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
webpage = self._download_webpage(url, video_id)
- title =
self._og_search_title(webpage
)
+ title =
re.sub(r' - 搜狐视频$', '', self._og_search_title(webpage)
)
vid = self._html_search_regex(
r'var vid ?= ?["\'](\d+)["\']',
vid = self._html_search_regex(
r'var vid ?= ?["\'](\d+)["\']',
@@
-172,9
+173,10
@@
class SohuIE(InfoExtractor):
info['id'] = video_id
else:
info = {
info['id'] = video_id
else:
info = {
- '_type': '
playlist
',
+ '_type': '
multi_video
',
'entries': playlist,
'id': video_id,
'entries': playlist,
'id': video_id,
+ 'title': title,
}
return info
}
return info