Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/newgrounds.py (Python)

Code before:
                fatal=False)

        timestamp = unified_timestamp(self._html_search_regex(
            (r'<dt>\s*Uploaded\s*</dt>\s*<dd>([^<]+</dd>\s*<dd>[^<]+)',
             r'<dt>\s*Uploaded\s*</dt>\s*<dd>([^<]+)'), webpage, 'timestamp',
            default=None))
        duration = parse_duration(self._html_search_regex(
            r'"duration"\s*:\s*["\']?([\d]+)["\']?,', webpage,
            'duration', default=None))

        view_count = parse_count(self._html_search_regex(
            r'(?s)<dt>\s*Views\s*</dt>\s*<dd>([\d\.,]+)</dd>', webpage,
            'view count', default=None))

        filesize = parse_filesize(self._html_search_regex(
            r'"filesize"\s*:\s*["\']?([\d]+)["\']?,', webpage, 'filesize',
            default=None))

        video_type_description = self._html_search_regex(
            r'"description"\s*:\s*["\']?([^"\']+)["\']?,', webpage, 'filesize',
            default=None)

        if len(formats) == 1:
            formats[0]['filesize'] = filesize

        if 'Audio File' == video_type_description:
            formats[0]['vcodec'] = 'none'
        self._check_formats(formats, media_id)
        self._sort_formats(formats)

        return {
            'id': media_id,
            'title': title,
            'uploader': uploader,
            'timestamp': timestamp,
            'duration': duration,
            'formats': formats,
            'thumbnail': self._og_search_thumbnail(webpage),
            'description': self._og_search_description(webpage),
            'view_count': view_count,
        }


class NewgroundsPlaylistIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?newgrounds\.com/(?:collection|[^/]+/search/[^/]+)/(?P<id>[^/?#&]+)'
    IE_NAME = 'Newgrounds:playlist'
    _TESTS = [{
        'url': 'https://www.newgrounds.com/collection/cats',
        'info_dict': {
            'id': 'cats',
            'title': 'Cats',

Review comment (suggestion):
```suggestion
        if video_type_description == 'Audio File':
```

Code after:

        timestamp = unified_timestamp(self._html_search_regex(
            (r'<dt>\s*Uploaded\s*</dt>\s*<dd>([^<]+</dd>\s*<dd>[^<]+)',
             r'<dt>\s*Uploaded\s*</dt>\s*<dd>([^<]+)'), webpage, 'timestamp',
            default=None))
        duration = parse_duration(self._html_search_regex(
            r'"duration"\s*:\s*["\']?([\d]+)["\']?,', webpage,
            'duration', default=None))

        view_count = parse_count(self._html_search_regex(
            r'(?s)<dt>\s*Views\s*</dt>\s*<dd>([\d\.,]+)</dd>', webpage,
            'view count', default=None))

        filesize = int_or_none(self._html_search_regex(
            r'"filesize"\s*:\s*["\']?([\d]+)["\']?,', webpage, 'filesize',
            default=None))

        video_type_description = self._html_search_regex(
            r'"description"\s*:\s*["\']?([^"\']+)["\']?,', webpage, 'filesize',
            default=None)

        if len(formats) == 1:
            formats[0]['filesize'] = filesize

        if video_type_description == 'Audio File':
            formats[0]['vcodec'] = 'none'
        self._check_formats(formats, media_id)
        self._sort_formats(formats)

        return {
            'id': media_id,
            'title': title,
            'uploader': uploader,
            'timestamp': timestamp,
            'duration': duration,
            'formats': formats,
            'thumbnail': self._og_search_thumbnail(webpage),
            'description': self._og_search_description(webpage),
            'view_count': view_count,
        }


class NewgroundsPlaylistIE(InfoExtractor):
    IE_NAME = 'Newgrounds:playlist'
    _VALID_URL = r'https?://(?:www\.)?newgrounds\.com/(?:collection|[^/]+/search/[^/]+)/(?P<id>[^/?#&]+)'
    _TESTS = [{
        'url': 'https://www.newgrounds.com/collection/cats',
        'info_dict': {
            'id': 'cats',
            'title': 'Cats',
        },