yt-dlp-utils 0.0.1__tar.gz → 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of yt-dlp-utils might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: yt-dlp-utils
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Utilities for programmatic use of yt-dlp.
5
5
  License: MIT
6
6
  Keywords: command line,yt-dlp
@@ -34,7 +34,7 @@ Description-Content-Type: text/markdown
34
34
  [![PyPI - Version](https://img.shields.io/pypi/v/yt-dlp-utils)](https://pypi.org/project/yt-dlp-utils/)
35
35
  [![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/yt-dlp-utils)](https://github.com/Tatsh/yt-dlp-utils/tags)
36
36
  [![License](https://img.shields.io/github/license/Tatsh/yt-dlp-utils)](https://github.com/Tatsh/yt-dlp-utils/blob/master/LICENSE.txt)
37
- [![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/yt-dlp-utils/v0.0.1/master)](https://github.com/Tatsh/yt-dlp-utils/compare/v0.0.1...master)
37
+ [![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/yt-dlp-utils/v0.0.2/master)](https://github.com/Tatsh/yt-dlp-utils/compare/v0.0.2...master)
38
38
  ![License](https://img.shields.io/badge/License-MIT-success.svg)
39
39
  [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
40
40
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
@@ -7,7 +7,7 @@
7
7
  [![PyPI - Version](https://img.shields.io/pypi/v/yt-dlp-utils)](https://pypi.org/project/yt-dlp-utils/)
8
8
  [![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/yt-dlp-utils)](https://github.com/Tatsh/yt-dlp-utils/tags)
9
9
  [![License](https://img.shields.io/github/license/Tatsh/yt-dlp-utils)](https://github.com/Tatsh/yt-dlp-utils/blob/master/LICENSE.txt)
10
- [![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/yt-dlp-utils/v0.0.1/master)](https://github.com/Tatsh/yt-dlp-utils/compare/v0.0.1...master)
10
+ [![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/yt-dlp-utils/v0.0.2/master)](https://github.com/Tatsh/yt-dlp-utils/compare/v0.0.2...master)
11
11
  ![License](https://img.shields.io/badge/License-MIT-success.svg)
12
12
  [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
13
13
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
@@ -20,7 +20,7 @@ keywords = ["command line", "yt-dlp"]
20
20
  license = "MIT"
21
21
  name = "yt-dlp-utils"
22
22
  readme = "README.md"
23
- version = "0.0.1"
23
+ version = "0.0.2"
24
24
 
25
25
  [[project.authors]]
26
26
  email = "audvare@gmail.com"
@@ -4,4 +4,4 @@ from __future__ import annotations
4
4
  from .lib import YoutubeDLLogger, get_configured_yt_dlp, setup_session
5
5
 
6
6
  __all__ = ('YoutubeDLLogger', 'get_configured_yt_dlp', 'setup_session')
7
- __version__ = '0.0.1'
7
+ __version__ = '0.0.2'
@@ -15,7 +15,7 @@ import yt_dlp
15
15
  from .constants import DEFAULT_RETRY_BACKOFF_FACTOR, DEFAULT_RETRY_STATUS_FORCELIST, SHARED_HEADERS
16
16
 
17
17
  if TYPE_CHECKING:
18
- from collections.abc import Collection, Iterable, Mapping
18
+ from collections.abc import Collection, Mapping
19
19
 
20
20
  __all__ = ('YoutubeDLLogger', 'get_configured_yt_dlp', 'setup_session')
21
21
 
@@ -82,7 +82,6 @@ def get_configured_yt_dlp(sleep_time: int = 3,
82
82
 
83
83
  def setup_session(browser: str,
84
84
  profile: str,
85
- domains: Iterable[str],
86
85
  headers: Mapping[str, str] | None = None,
87
86
  add_headers: Mapping[str, str] | None = None,
88
87
  backoff_factor: float = DEFAULT_RETRY_BACKOFF_FACTOR,
@@ -99,8 +98,6 @@ def setup_session(browser: str,
99
98
  The browser to extract cookies from.
100
99
  profile : str
101
100
  The profile to extract cookies from.
102
- domains : Iterable[str]
103
- The domains of which to extract cookies.
104
101
  headers : Mapping[str, str]
105
102
  The headers to use for the requests session. If not specified, a default set will be used.
106
103
  add_headers : Mapping[str, str]
@@ -125,9 +122,5 @@ def setup_session(browser: str,
125
122
  'https://',
126
123
  HTTPAdapter(max_retries=Retry(backoff_factor=backoff_factor,
127
124
  status_forcelist=status_forcelist)))
128
- extracted = extract_cookies_from_browser(browser, profile)
129
- cookies = '; '.join('; '.join(f'{cookie.name}={cookie.value}' for cookie in extracted
130
- if domain in cookie.domain) for domain in domains)
131
- # | does not work for Mapping
132
- session.headers.update({**headers, **add_headers, 'cookie': cookies})
125
+ session.headers.update(extract_cookies_from_browser(browser, profile))
133
126
  return session
File without changes