Skip to content

Commit

Permalink
yt_dlp: 5d3a3cd4934853126a5d6b721dbec6946c9cd8ce
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 14, 2023
1 parent afe24c5 commit 34d249d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
11 changes: 6 additions & 5 deletions lib/yt_dlp/extractor/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
determine_protocol,
dict_get,
extract_basic_auth,
filter_dict,
format_field,
int_or_none,
is_html,
Expand Down Expand Up @@ -2435,10 +2436,10 @@ def _real_extract(self, url):
# to accept raw bytes and being able to download only a chunk.
# It may probably better to solve this by checking Content-Type for application/octet-stream
# after a HEAD request, but not sure if we can rely on this.
full_response = self._request_webpage(url, video_id, headers={
full_response = self._request_webpage(url, video_id, headers=filter_dict({
'Accept-Encoding': 'identity',
**smuggled_data.get('http_headers', {})
})
'Referer': smuggled_data.get('referer'),
}))
new_url = full_response.url
url = urllib.parse.urlparse(url)._replace(scheme=urllib.parse.urlparse(new_url).scheme).geturl()
if new_url != extract_basic_auth(url)[0]:
Expand All @@ -2458,7 +2459,7 @@ def _real_extract(self, url):
m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
if m:
self.report_detected('direct video link')
headers = smuggled_data.get('http_headers', {})
headers = filter_dict({'Referer': smuggled_data.get('referer')})
format_id = str(m.group('format_id'))
ext = determine_ext(url, default_ext=None) or urlhandle_detect_ext(full_response)
subtitles = {}
Expand Down Expand Up @@ -2710,7 +2711,7 @@ def _extract_embeds(self, url, webpage, *, urlh=None, info_dict={}):
'url': smuggle_url(json_ld['url'], {
'force_videoid': video_id,
'to_generic': True,
'http_headers': {'Referer': url},
'referer': url,
}),
}, json_ld)]

Expand Down
3 changes: 2 additions & 1 deletion lib/yt_dlp/networking/_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ def __init__(self, *args, **kwargs):
handler.setFormatter(logging.Formatter('requests: %(message)s'))
handler.addFilter(Urllib3LoggingFilter())
logger.addHandler(handler)
logger.setLevel(logging.WARNING)
# TODO: Use a logger filter to suppress pool reuse warning instead
logger.setLevel(logging.ERROR)

if self.verbose:
# Setting this globally is not ideal, but is easier than hacking with urllib3.
Expand Down
1 change: 1 addition & 0 deletions lib/yt_dlp/utils/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def clean_headers(headers: HTTPHeaderDict):
if 'Youtubedl-No-Compression' in headers: # compat
del headers['Youtubedl-No-Compression']
headers['Accept-Encoding'] = 'identity'
headers.pop('Ytdl-socks-proxy', None)


def remove_dot_segments(path):
Expand Down
6 changes: 3 additions & 3 deletions lib/yt_dlp/version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Autogenerated by devscripts/update-version.py

__version__ = '2023.10.13'
__version__ = '2023.11.14'

RELEASE_GIT_HEAD = 'b634ba742d8f38ce9ecfa0546485728b0c6c59d1'
RELEASE_GIT_HEAD = 'a9d3f4b20a3533d2a40104c85bc2cc6c2564c800'

VARIANT = None

Expand All @@ -12,4 +12,4 @@

ORIGIN = 'yt-dlp/yt-dlp'

_pkg_version = '2023.10.13'
_pkg_version = '2023.11.14'

0 comments on commit 34d249d

Please sign in to comment.