~ubuntu-branches/ubuntu/vivid/youtube-dl/vivid

« back to all changes in this revision

Viewing changes to youtube_dl/extractor/bloomberg.py

  • Committer: Package Import Robot
  • Author(s): Rogério Brito
  • Date: 2015-03-01 02:12:13 UTC
  • mfrom: (44.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20150301021213-8w657cue71kp77sz
Tags: 2015.02.28-1
Imported Upstream version 2015.02.28. Closes: #778765.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
 
8
8
class BloombergIE(InfoExtractor):
9
 
    _VALID_URL = r'https?://www\.bloomberg\.com/video/(?P<name>.+?)\.html'
 
9
    _VALID_URL = r'https?://www\.bloomberg\.com/video/(?P<id>.+?)\.html'
10
10
 
11
11
    _TEST = {
12
12
        'url': 'http://www.bloomberg.com/video/shah-s-presentation-on-foreign-exchange-strategies-qurhIVlJSB6hzkVi229d8g.html',
20
20
    }
21
21
 
22
22
    def _real_extract(self, url):
23
 
        mobj = re.match(self._VALID_URL, url)
24
 
        name = mobj.group('name')
 
23
        name = self._match_id(url)
25
24
        webpage = self._download_webpage(url, name)
 
25
 
26
26
        f4m_url = self._search_regex(
27
27
            r'<source src="(https?://[^"]+\.f4m.*?)"', webpage,
28
28
            'f4m url')