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

Code before:
        'url': 'https://zingmp3.vn/new-release/album',
        'info_dict': {
            'id': 'new-release-album',
        },
        'playlist_mincount': 20,
    }]

    def _fetch_page(self, user_id, url_type, page):
        url_type = 'user-list-song' if url_type == 'bai-hat' else 'user-list-video'
        return self._call_api(url_type, {
            'id': user_id,
            'type': 'artist',
            'page': page,
            'count': self._PER_PAGE
        })

    def _real_extract(self, url):
        alias, url_type = self._match_valid_url(url).group('user', 'type')
        if not url_type:
            url_type = 'bai-hat'

        user_info = self._call_api('info-artist', {}, alias, query={'alias': alias})

        # Handle for new-release
        if alias == 'new-release' and url_type in ('song', 'album'):
            self._IE_NAME = 'zingmp3:NewRelease'
            _id = f'{alias}-{url_type}'
            data = self._call_api('new-release', params={'type': url_type}, display_id=_id)
            return self.playlist_result(self._parse_items(data), _id)
        else:
            # Handle for user/artist
            if url_type in ('bai-hat', 'video'):
                entries = self._paged_list(user_info['id'], url_type)
            else:
                entries = self._parse_items(traverse_obj(user_info, (
                    'sections',
                    lambda _, v: v['sectionId'] == 'aAlbum' if url_type == 'album' else v['sectionId'] == 'aSingle',
                    'items', ...)))
            return self.playlist_result(
                entries, user_info['id'], f'{user_info.get("name")} - {url_type}', user_info.get('biography'))


class ZingMp3HubIE(ZingMp3BaseIE):
    IE_NAME = 'zingmp3:hub'
    _VALID_URL = r'https?://(?:mp3\.zing|zingmp3)\.vn/(?P<type>hub)/(?P<regions>[^/]+)/(?P<id>[^\.]+)'
    _TESTS = [{
        'url': 'https://zingmp3.vn/hub/Nhac-Moi/IWZ9Z0CA.html',
        'info_dict': {
            'id': 'IWZ9Z0CA',
            'title': 'BXH Nhạc Mới',
            'description': 'md5:1cc31b68a6f746427b07b2756c22a558',

Review comment (refactor):
as discussed in a previous comment, we should not change the `IE_NAME` during extraction
```suggestion
```

Code after:
        },
        'playlist_mincount': 50,
    }, {
        'url': 'https://zingmp3.vn/new-release/album',
        'info_dict': {
            'id': 'new-release-album',
        },
        'playlist_mincount': 20,
    }]

    def _fetch_page(self, user_id, url_type, page):
        url_type = 'user-list-song' if url_type == 'bai-hat' else 'user-list-video'
        return self._call_api(url_type, {
            'id': user_id,
            'type': 'artist',
            'page': page,
            'count': self._PER_PAGE
        })

    def _real_extract(self, url):
        alias, url_type = self._match_valid_url(url).group('user', 'type')
        if not url_type:
            url_type = 'bai-hat'

        user_info = self._call_api('info-artist', {}, alias, query={'alias': alias})

        # Handle for new-release
        if alias == 'new-release' and url_type in ('song', 'album'):
            _id = f'{alias}-{url_type}'
            return self.playlist_result(self._parse_items(
                self._call_api('new-release', params={'type': url_type}, display_id=_id)), _id)
        else:
            # Handle for user/artist
            if url_type in ('bai-hat', 'video'):
                entries = self._paged_list(user_info['id'], url_type)
            else:
                section_id = 'aAlbum' if url_type == 'album' else 'aSingle'
                entries = self._parse_items(traverse_obj(user_info, (
                    'sections', lambda _, v: v['sectionId'] == section_id, 'items', ...)))
            return self.playlist_result(
                entries, user_info['id'], join_nonempty(user_info.get('name'), url_type, delim=' - '),
                user_info.get('biography'))


class ZingMp3HubIE(ZingMp3BaseIE):
    IE_NAME = 'zingmp3:hub'
    _VALID_URL = r'https?://(?:mp3\.zing|zingmp3)\.vn/(?P<type>hub)/(?P<regions>[^/]+)/(?P<id>[^\.]+)'
    _TESTS = [{
        'url': 'https://zingmp3.vn/hub/Nhac-Moi/IWZ9Z0CA.html',
        'info_dict': {
            'id': 'IWZ9Z0CA',