summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/performgroup.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/performgroup.py')
-rw-r--r--yt_dlp/extractor/performgroup.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/yt_dlp/extractor/performgroup.py b/yt_dlp/extractor/performgroup.py
index f4d7f22..df726c9 100644
--- a/yt_dlp/extractor/performgroup.py
+++ b/yt_dlp/extractor/performgroup.py
@@ -1,5 +1,5 @@
from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import int_or_none, join_nonempty
class PerformGroupIE(InfoExtractor):
@@ -15,12 +15,12 @@ class PerformGroupIE(InfoExtractor):
'description': 'md5:7cd3b459c82725b021e046ab10bf1c5b',
'timestamp': 1511533477,
'upload_date': '20171124',
- }
+ },
}]
def _call_api(self, service, auth_token, content_id, referer_url):
return self._download_json(
- 'http://ep3.performfeeds.com/ep%s/%s/%s/' % (service, auth_token, content_id),
+ f'http://ep3.performfeeds.com/ep{service}/{auth_token}/{content_id}/',
content_id, headers={
'Referer': referer_url,
'Origin': 'http://player.performgroup.com',
@@ -50,11 +50,8 @@ class PerformGroupIE(InfoExtractor):
if not c_url:
continue
tbr = int_or_none(c.get('bitrate'), 1000)
- format_id = 'http'
- if tbr:
- format_id += '-%d' % tbr
formats.append({
- 'format_id': format_id,
+ 'format_id': join_nonempty('http', tbr),
'url': c_url,
'tbr': tbr,
'width': int_or_none(c.get('width')),