

def _real_extract(self, url):
    mobj = re.match(self._VALID_URL, url)
    video_id = mobj.group('video_id')
    webpage = self._download_webpage(url, video_id)
    video_title = self._og_search_title(webpage).replace('LiveLeak.com -', '').strip()
    video_description = self._og_search_description(webpage)
    video_uploader = self._html_search_regex('By:.*?(\\w+)</a>', webpage, 'uploader', fatal=False)
    age_limit = int_or_none(self._search_regex('you confirm that you are ([0-9]+) years and over.', webpage, 'age limit', default=None))
    sources_raw = self._search_regex('(?s)sources:\\s*(\\[.*?\\]),', webpage, 'video URLs', default=None)
    if (sources_raw is None):
        alt_source = self._search_regex('(file: ".*?"),', webpage, 'video URL', default=None)
        if alt_source:
            sources_raw = ('[{ %s}]' % alt_source)
        else:
            embed_url = self._search_regex('<iframe[^>]+src="(http://www.prochan.com/embed\\?[^"]+)"', webpage, 'embed URL')
            return {
                '_type': 'url_transparent',
                'url': embed_url,
                'id': video_id,
                'title': video_title,
                'description': video_description,
                'uploader': video_uploader,
                'age_limit': age_limit,
            }
    sources_json = re.sub('\\s([a-z]+):\\s', '"\\1": ', sources_raw)
    sources = json.loads(sources_json)
    formats = [{
        'format_note': s.get('label'),
        'url': s['file'],
    } for s in sources]
    self._sort_formats(formats)
    return {
        'id': video_id,
        'title': video_title,
        'description': video_description,
        'uploader': video_uploader,
        'formats': formats,
        'age_limit': age_limit,
    }

dataset/ETHPy150Open yasoob/youtube-dl-GUI/youtube_dl/extractor/liveleak.py LiveLeakIE._real_extract/original