diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2017-01-20 21:59:24 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2017-01-20 22:27:13 +0800 |
commit | d77ac737900eede5e1508b9822e71c8595fe0879 (patch) | |
tree | 45839f0805ca072058d8e1cde65509be3632d6db /youtube_dl/extractor/ustream.py | |
parent | 1fe84be0f3b36822af804db6cf7c06a1ac5ac688 (diff) |
[ustream] Add UstreamIE._extract_url()
Ref: #11547
Diffstat (limited to 'youtube_dl/extractor/ustream.py')
-rw-r--r-- | youtube_dl/extractor/ustream.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ustream.py b/youtube_dl/extractor/ustream.py index 0c06bf36b..5737d4d16 100644 --- a/youtube_dl/extractor/ustream.py +++ b/youtube_dl/extractor/ustream.py @@ -69,6 +69,13 @@ class UstreamIE(InfoExtractor): }, }] + @staticmethod + def _extract_url(webpage): + mobj = re.search( + r'<iframe[^>]+?src=(["\'])(?P<url>http://www\.ustream\.tv/embed/.+?)\1', webpage) + if mobj is not None: + return mobj.group('url') + def _get_stream_info(self, url, video_id, app_id_ver, extra_note=None): def num_to_hex(n): return hex(n)[2:] |