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

Code before:
            '_type': 'playlist',
            'id': 'IWZ98609',
            'title': 'Mr. Siro - video',
            'description': 'md5:85ab29bd7b21725c12bf76fd1d6922e5',
        },
        'playlist_mincount': 15,
    }]

    def _fetch_page(self, user_id, type_url, page):
        page += 1
        name_api = self._SLUG_API['user-list-song'] if type_url == 'bai-hat' else self._SLUG_API['user-list-video']
        api = self.get_api_with_signature(name_api=name_api, param={
            'id': user_id,
            'type': 'artist',
            'page': page,
            'count': self._PER_PAGE
        })
        data = self._download_json(api, user_id, query={'sort': 'new', 'sectionId': 'aSong'})['data']
        return self._entries(data.get('items'))

    def _real_extract(self, url):
        user_alias, type_url = self._match_valid_url(url).group('user', 'type')
        if not type_url:
            type_url = 'bai-hat'
        user_info = self._download_json(self.get_api_with_signature(name_api=self._SLUG_API['info-artist'], param={}),
                                        video_id=user_alias, query={'alias': user_alias})['data']
        user_id = user_info.get('id')
        biography = user_info.get('biography')
        if type_url == 'bai-hat' or type_url == 'video':
            entries = OnDemandPagedList(functools.partial(self._fetch_page, user_id, type_url), self._PER_PAGE)
            return self.playlist_result(entries, user_id, f'{user_info.get("name")} - {type_url}', biography)
        else:
            lst_entries = []
            for section in user_info.get('sections', {}):
                if section.get('link') == f'/{user_alias}/{type_url}':
                    items = section.get('items')
                    for item in items:
                        lst_entries.append(self.url_result(urljoin(self._DOMAIN, item.get('link'))))
                    break
            return self.playlist_result(lst_entries, user_id, f'{user_info.get("name")} - {type_url}', biography)


Review comment (suggestion):
```suggestion
        user_info = self._download_json(
            self.get_api_with_signature(name_api=self._SLUG_API['info-artist'], param={}),
            video_id=user_alias, query={'alias': user_alias})['data']
```

Code after:
    }, {
        'url': 'https://zingmp3.vn/Mr-Siro/single',
        'info_dict': {
            'id': 'IWZ98609',
            'title': 'Mr. Siro - single',
            'description': 'md5:85ab29bd7b21725c12bf76fd1d6922e5',
        },
        'playlist_mincount': 20,
    }, {
        'url': 'https://zingmp3.vn/Mr-Siro/video',
        'info_dict': {
            'id': 'IWZ98609',
            'title': 'Mr. Siro - video',
            'description': 'md5:85ab29bd7b21725c12bf76fd1d6922e5',
        },
        'playlist_mincount': 15,
    }]

    def _fetch_page(self, user_id, type_url, page):
        page += 1
        name_api = self._SLUG_API['user-list-song'] if type_url == 'bai-hat' else self._SLUG_API['user-list-video']
        api = self.get_api_with_signature(name_api=name_api, param={
            'id': user_id,
            'type': 'artist',
            'page': page,
            'count': self._PER_PAGE
        })
        data = self._download_json(api, user_id, query={'sort': 'new', 'sectionId': 'aSong'})['data']
        return self._entries(data.get('items'))

    def _real_extract(self, url):
        user_alias, type_url = self._match_valid_url(url).group('user', 'type')
        if not type_url:
            type_url = 'bai-hat'
        user_info = self._download_json(
            self.get_api_with_signature(name_api=self._SLUG_API['info-artist'], param={}),
            video_id=user_alias, query={'alias': user_alias})['data']
        user_id = user_info.get('id')
        biography = user_info.get('biography')
        if type_url == 'bai-hat' or type_url == 'video':
            entries = OnDemandPagedList(functools.partial(self._fetch_page, user_id, type_url), self._PER_PAGE)
            return self.playlist_result(entries, user_id, f'{user_info.get("name")} - {type_url}', biography)
        else:
            entries = []
            for section in user_info.get('sections', {}):
                if section.get('link') == f'/{user_alias}/{type_url}':
                    items = section.get('items')
                    for item in items:
                        entries.append(self.url_result(urljoin(self._DOMAIN, item.get('link'))))
                    break
            return self.playlist_result(entries, user_id, f'{user_info.get("name")} - {type_url}', biography)