summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/performgroup.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/performgroup.py
parentReleasing progress-linux version 2024.05.27-1~progress7.99u1. (diff)
downloadyt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz
yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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')),