- page = self._download_webpage(url, video_id, 'Downloading page')
-
- def extract(patterns, name, page, fatal=False):
- for pattern in patterns:
- mobj = re.search(pattern, page)
- if mobj:
- return mobj.group(1)
- if fatal:
- raise RegexNotFoundError(u'Unable to extract %s' % name)
- return None