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

Code before:
    likesCount
    viewsCount
    thumbnailKey
    tagList
    user {
      name
      __typename
    }
    __typename
  }
}'''})
        meta = data['medium']

        storage_url = 'https://storage.murrtube.net/murrtube/'
        format_url = storage_url + meta.get('key', '')
        thumbnail = storage_url + meta.get('thumbnailKey', '')

        formats = []
        if determine_ext(format_url) == 'm3u8':
            formats.extend(self._extract_m3u8_formats(
                format_url, video_id, 'mp4', entry_protocol='m3u8_native',
                fatal=False))
        else:
            formats.append({
                'url': format_url,
            })

        return {
            'id': video_id,
            'title': meta.get('title'),
            'description': meta.get('description'),
            'formats': formats,
            'thumbnail': thumbnail,
            'duration': int(meta.get('duration', 0)),
            'uploader': meta.get('user', {}).get('name'),
            'view_count': meta.get('viewsCount'),
            'like_count': meta.get('likesCount'),
            'comment_count': meta.get('commentsCount'),
            'tags': meta.get('tagList'),
            'age_limit': 18,
        }


class MurrtubeUserIE(MurrtubeIE):
    IE_DESC = 'Murrtube user profile'
    _VALID_URL = r'https?://murrtube\.net/(?P<id>[^/]+)$'
    _TEST = {
        'url': 'https://murrtube.net/stormy',
        'info_dict': {
            'id': 'stormy',
        },

Review comment (refactor):
```suggestion
        if determine_ext(format_url) == 'm3u8':
            formats = self._extract_m3u8_formats(
                format_url, video_id, 'mp4', entry_protocol='m3u8_native', fatal=False)
        else:
            formats = [{'url': format_url}]
```

Code after:
    commentsCount
    likesCount
    viewsCount
    thumbnailKey
    tagList
    user {
      name
      __typename
    }
    __typename
  }
}'''})
        meta = data['medium']

        storage_url = 'https://storage.murrtube.net/murrtube/'
        format_url = storage_url + meta.get('key', '')
        thumbnail = storage_url + meta.get('thumbnailKey', '')

        if determine_ext(format_url) == 'm3u8':
            formats = self._extract_m3u8_formats(
                format_url, video_id, 'mp4', entry_protocol='m3u8_native', fatal=False)
        else:
            formats = [{'url': format_url}]

        return {
            'id': video_id,
            'title': meta.get('title'),
            'description': meta.get('description'),
            'formats': formats,
            'thumbnail': thumbnail,
            'duration': int_or_none(meta.get('duration')),
            'uploader': try_get(meta, lambda x: x['user']['name']),
            'view_count': meta.get('viewsCount'),
            'like_count': meta.get('likesCount'),
            'comment_count': meta.get('commentsCount'),
            'tags': meta.get('tagList'),
            'age_limit': 18,
        }


class MurrtubeUserIE(MurrtubeIE):
    IE_DESC = 'Murrtube user profile'
    _VALID_URL = r'https?://murrtube\.net/(?P<id>[^/]+)$'
    _TEST = {
        'url': 'https://murrtube.net/stormy',
        'info_dict': {
            'id': 'stormy',
        },
        'playlist_mincount': 27,
    }
    _PAGE_SIZE = 10