Skip to content

Commit

Permalink
[ie/SampleFocus] Fix extractor (yt-dlp#10947)
Browse files Browse the repository at this point in the history
Closes yt-dlp#10945
Authored by: seproDev
  • Loading branch information
seproDev authored Sep 7, 2024
1 parent 0fba084 commit 46f4c80
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions yt_dlp/extractor/samplefocus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+)',
Expand Down Expand Up @@ -82,7 +82,15 @@ def extract_count(klass):
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,
Expand Down

0 comments on commit 46f4c80

Please sign in to comment.