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

Code before:
            'ext': 'aac',
            'title': str,
            'thumbnail': 'md5:6f13378a53ce55bcf57365a654e1b490',
            'live_status': 'is_live',
            'description': 'turn up the feel good!',
            'display_id': 'heart-uk',

        }}, {
        # regional variation
        'url': 'https://www.globalplayer.com/live/heart/london/',
        'info_dict': {
            'id': 'AMqg',
            'ext': 'aac',
            'title': str,
            'thumbnail': 'md5:6f13378a53ce55bcf57365a654e1b490',
            'description': 'turn up the feel good!',
            'live_status': 'is_live',
            'display_id': 'heart-london',

        }},
    ]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        station = self._get_pageProps(url, video_id)['station']
        url = station['streamUrl']

        display_id = [station.get('brandSlug'), station.get('slug')]
        if None not in display_id:
            display_id = '-'.join(display_id)
        else:
            display_id = station.get('brandSlug') or station.get('legacyStationPrefix')

        return {
            'id': station['id'],
            'display_id': display_id,
            'url': url,
            'ext': self._request_ext(url, video_id),
            'vcodec': 'none',
            'is_live': True,
            **traverse_obj(station, {
                'title': (['name', 'brandName'], {str_or_none}),
                'description': 'tagline',
                'thumbnail': 'brandLogo',
            }, get_all=False),
        }


class GlobalPlayerLivePlaylistIE(GlobalPlayerBaseIE):
    _VALID_URL = r'https?://www\.globalplayer\.com/playlists/(?P<id>\w+)/$'
    _TESTS = [{

Review comment (suggestion):
it improves readability to use a new var for the format url imo
```suggestion
        stream_url = station['streamUrl']
```

Code after:
            'ext': 'aac',
            'description': 'turn up the feel good!',
            'thumbnail': 'https://herald.musicradio.com/media/49b9e8cb-15bf-4bf2-8c28-a4850cc6b0f3.png',
            'live_status': 'is_live',
            'title': 're:^Heart UK.+$',
            'display_id': 'heart-uk',
        },
    }, {
        # regional variation
        'url': 'https://www.globalplayer.com/live/heart/london/',
        'info_dict': {
            'id': 'AMqg',
            'ext': 'aac',
            'thumbnail': 'https://herald.musicradio.com/media/49b9e8cb-15bf-4bf2-8c28-a4850cc6b0f3.png',
            'title': 're:^Heart London.+$',
            'live_status': 'is_live',
            'display_id': 'heart-london',
            'description': 'turn up the feel good!',
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        station = self._get_page_props(url, video_id)['station']
        stream_url = station['streamUrl']

        return {
            'id': station['id'],
            'display_id': join_nonempty('brandSlug', 'slug', from_dict=station) or station.get('legacyStationPrefix'),
            'url': stream_url,
            'ext': self._request_ext(stream_url, video_id),
            'vcodec': 'none',
            'is_live': True,
            **traverse_obj(station, {
                'title': (('name', 'brandName'), {str_or_none}),
                'description': 'tagline',
                'thumbnail': 'brandLogo',
            }, get_all=False),
        }


class GlobalPlayerLivePlaylistIE(GlobalPlayerBaseIE):
    _VALID_URL = r'https?://www\.globalplayer\.com/playlists/(?P<id>\w+)'
    _TESTS = [{
        # "live playlist"
        'url': 'https://www.globalplayer.com/playlists/8bLk/',
        'info_dict': {
            'id': '8bLk',
            'ext': 'aac',
            'live_status': 'is_live',
            'description': 'md5:e10f5e10b01a7f2c14ba815509fbb38d',