aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/samplefocus.py
diff options
context:
space:
mode:
authorsepro <sepro@sepr0.com>2024-09-07 17:06:12 +0200
committerGitHub <noreply@github.com>2024-09-07 17:06:12 +0200
commit46f4c80bc363ee8116c33d37f65202e6c3470954 (patch)
tree94b5ed09e57856e21a3698111be803405caf1913 /yt_dlp/extractor/samplefocus.py
parent0fba08485b6445b72b5b63ae23ca2a73fa5d967f (diff)
[ie/SampleFocus] Fix extractor (#10947)
Closes #10945 Authored by: seproDev
Diffstat (limited to 'yt_dlp/extractor/samplefocus.py')
-rw-r--r--yt_dlp/extractor/samplefocus.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/yt_dlp/extractor/samplefocus.py b/yt_dlp/extractor/samplefocus.py
index 36ceb0254..3db3ce142 100644
--- a/yt_dlp/extractor/samplefocus.py
+++ b/yt_dlp/extractor/samplefocus.py
@@ -36,7 +36,7 @@ class SampleFocusIE(InfoExtractor):
def _real_extract(self, url):
display_id = self._match_id(url)
- webpage = self._download_webpage(url, display_id)
+ webpage = self._download_webpage(url, display_id, impersonate=True)
sample_id = self._search_regex(
r'<input[^>]+id=(["\'])sample_id\1[^>]+value=(?:["\'])(?P<id>\d+)',
@@ -82,7 +82,15 @@ class SampleFocusIE(InfoExtractor):
return {
'id': sample_id,
'title': title,
- 'url': mp3_url,
+ 'formats': [{
+ 'url': mp3_url,
+ 'ext': 'mp3',
+ 'vcodec': 'none',
+ 'acodec': 'mp3',
+ 'http_headers': {
+ 'Referer': url,
+ },
+ }],
'display_id': display_id,
'thumbnail': thumbnail,
'uploader': uploader,