{"record":{"id":"9822b9b104b61bbd","repo":"ytdl-org/youtube-dl","slug":"item-msg-dynamic-server-message-e-g-sorry","errorCode":null,"errorMessage":"item['msg'] (dynamic server message, e.g. 'Sorry, this content is not available in your country.')","messagePattern":"item\\['msg'\\] \\(dynamic server message, e\\.g\\. 'Sorry, this content is not available in your country\\.'\\)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/zingmp3.py","lineNumber":52,"sourceCode":"                            'url': video_url,\n                            'height': int_or_none(self._search_regex(\n                                r'^(\\d+)p', res, 'resolution', default=None)),\n                        })\n            else:\n                formats.append({\n                    'ext': 'mp3',\n                    'format_id': k,\n                    'tbr': int_or_none(k),\n                    'url': self._proto_relative_url(v),\n                    'vcodec': 'none',\n                })\n        if not formats:\n            if not fatal:\n                return\n            msg = item['msg']\n            if msg == 'Sorry, this content is not available in your country.':\n                self.raise_geo_restricted(countries=self._GEO_COUNTRIES)\n            raise ExtractorError(msg, expected=True)\n        self._sort_formats(formats)\n\n        subtitles = None\n        lyric = item.get('lyric')\n        if lyric:\n            subtitles = {\n                'origin': [{\n                    'url': lyric,\n                }],\n            }\n\n        album = item.get('album') or {}\n\n        return {\n            'id': item_id,\n            'title': title,\n            'formats': formats,\n            'thumbnail': item.get('thumbnail'),","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/zingmp3.py#L34-L70","documentation":"Raised by the ZingMp3 extractor when the API 'item' contained no playable formats and fatal is true. The message is taken verbatim from item['msg']; the known value 'Sorry, this content is not available in your country.' is converted into a geo-restriction error (raise_geo_restricted) before this generic raise, so this path carries any other server reason.","triggerScenarios":"Requesting a ZingMp3 track whose API item has no 'sources'/'formats' entries and a non-empty 'msg' — typically content removed for licensing, region locks other than the recognized geo message, or account/age restrictions.","commonSituations":"Songs delisted from ZingMp3 after licensing expiry; VPN/proxy making the service return a restriction message; VIP-only tracks on a free session.","solutions":["Open the track page in a browser to see the site's own notice (removed / VIP / region locked)","If region-related, retry without VPN or with a VPN into Vietnam, depending on where the block applies","Log in with --username/--password if the track requires a VIP account","Update youtube-dl so newer API responses and message handling are supported"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.download([url])\nexcept ExtractorError as e:\n    msg = str(e)\n    if 'not available in your country' in msg or e.exc_info and 'geo' in type(e).__name__.lower():\n        route_through_allowed_region(url)\n    else:\n        log.warning('ZingMp3 server message: %s', msg)","preventionTips":["Handle the geo-restriction variant separately from other server messages","Confirm tracks are playable in a browser with the same network/account before batch jobs","Pass account credentials when downloading VIP-gated content"],"tags":["zingmp3","geo-restriction","dynamic-message","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}