

def _get_info(self, video_id):
    metadata = self._download_json(('http://e.omroep.nl/metadata/aflevering/%s' % video_id), video_id, transform_source=strip_jsonp)
    token = self._get_token(video_id)
    formats = []
    pubopties = metadata.get('pubopties')
    if pubopties:
        quality = qualities(['adaptive', 'wmv_sb', 'h264_sb', 'wmv_bb', 'h264_bb', 'wvc1_std', 'h264_std'])
        for format_id in pubopties:
            format_info = self._download_json(('http://ida.omroep.nl/odi/?prid=%s&puboptions=%s&adaptive=yes&token=%s' % (video_id, format_id, token)), video_id, ('Downloading %s JSON' % format_id))
            if (format_info.get('error_code', 0) or format_info.get('errorcode', 0)):
                continue
            streams = format_info.get('streams')
            if streams:
                video_info = self._download_json((streams[0] + '&type=json'), video_id, ('Downloading %s stream JSON' % format_id))
            else:
                video_info = format_info
            video_url = video_info.get('url')
            if (not video_url):
                continue
            if (format_id == 'adaptive'):
                formats.extend(self._extract_m3u8_formats(video_url, video_id))
            else:
                formats.append({
                    'url': video_url,
                    'format_id': format_id,
                    'quality': quality(format_id),
                })
    streams = metadata.get('streams')
    if streams:
        for (i, stream) in enumerate(streams):
            stream_url = stream.get('url')
            if (not stream_url):
                continue
            if ('.asf' not in stream_url):
                formats.append({
                    'url': stream_url,
                    'quality': stream.get('kwaliteit'),
                })
                continue
            asx = self._download_xml(stream_url, video_id, ('Downloading stream %d ASX playlist' % i), transform_source=fix_xml_ampersands)
            ref = asx.find('./ENTRY/Ref')
            if (ref is None):
                continue
            video_url = ref.get('href')
            if (not video_url):
                continue
            formats.append({
                'url': video_url,
                'ext': stream.get('formaat', 'asf'),
                'quality': stream.get('kwaliteit'),
            })
    self._sort_formats(formats)
    return {
        'id': video_id,
        'title': metadata['titel'],
        'description': metadata['info'],
        'thumbnail': metadata.get('images', [{
            'url': None,
        }])[(- 1)]['url'],
        'upload_date': unified_strdate(metadata.get('gidsdatum')),
        'duration': parse_duration(metadata.get('tijdsduur')),
        'formats': formats,
    }

dataset/ETHPy150Open yasoob/youtube-dl-GUI/youtube_dl/extractor/npo.py NPOIE._get_info/original