projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61e40c8
)
clean up
author
Johny Mo Swag
<johnymo@me.com>
Thu, 7 Mar 2013 23:39:17 +0000
(15:39 -0800)
committer
Johny Mo Swag
<johnymo@me.com>
Thu, 7 Mar 2013 23:39:17 +0000
(15:39 -0800)
youtube_dl/InfoExtractors.py
patch
|
blob
|
history
diff --git
a/youtube_dl/InfoExtractors.py
b/youtube_dl/InfoExtractors.py
index 58803c48a43955e5631f6205402809396b229341..178b0beed441f4023106a58abf80a4e69b07dac3 100755
(executable)
--- a/
youtube_dl/InfoExtractors.py
+++ b/
youtube_dl/InfoExtractors.py
@@
-3659,20
+3659,19
@@
class WorldStarHipHopIE(InfoExtractor):
IE_NAME = u'WorldStarHipHop'
def _real_extract(self, url):
IE_NAME = u'WorldStarHipHop'
def _real_extract(self, url):
- results = []
-
_src_url = r"""(http://hw-videos.*(?:mp4|flv))"""
webpage_src = compat_urllib_request.urlopen(str(url)).read()
_src_url = r"""(http://hw-videos.*(?:mp4|flv))"""
webpage_src = compat_urllib_request.urlopen(str(url)).read()
+ webpage_src = webpage_src.decode('utf-8')
mobj = re.search(_src_url, webpage_src)
if mobj is not None:
video_url = mobj.group()
if 'mp4' in video_url:
mobj = re.search(_src_url, webpage_src)
if mobj is not None:
video_url = mobj.group()
if 'mp4' in video_url:
- ext = '
.
mp4'
+ ext = 'mp4'
else:
else:
- ext = '
.
flv'
+ ext = 'flv'
else:
video_url = None
ext = None
else:
video_url = None
ext = None
@@
-3683,16
+3682,12
@@
class WorldStarHipHopIE(InfoExtractor):
if mobj is not None:
title = mobj.group(1)
if mobj is not None:
title = mobj.group(1)
- title = title.replace("'", "")
- title = title.replace("'", "")
- title = title.replace('Video: ', '')
- title = title.replace('"', '"')
- title = title.replace('&', 'n')
else:
else:
- title =
None
+ title =
'World Start Hip Hop - %s' % time.ctime()
_thumbnail = r"""rel="image_src" href="(.*)" />"""
_thumbnail = r"""rel="image_src" href="(.*)" />"""
+ print title
mobj = re.search(_thumbnail, webpage_src)
# Getting thumbnail and if not thumbnail sets correct title for WSHH candy video.
mobj = re.search(_thumbnail, webpage_src)
# Getting thumbnail and if not thumbnail sets correct title for WSHH candy video.
@@
-3705,13
+3700,12
@@
class WorldStarHipHopIE(InfoExtractor):
title = mobj.group(1)
thumbnail = None
title = mobj.group(1)
thumbnail = None
- results.append({
- 'url' : video_url,
- 'title' : title,
- 'thumbnail' : thumbnail,
- 'ext' : ext
- })
-
+ results = [{
+ 'url' : video_url,
+ 'title' : title,
+ 'thumbnail' : thumbnail,
+ 'ext' : ext,
+ }]
return results
class RBMARadioIE(InfoExtractor):
return results
class RBMARadioIE(InfoExtractor):