yt-dlp-utils 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl
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.
- yt_dlp_utils/__init__.py +1 -1
- yt_dlp_utils/lib.py +2 -9
- {yt_dlp_utils-0.0.1.dist-info → yt_dlp_utils-0.0.2.dist-info}/METADATA +2 -2
- yt_dlp_utils-0.0.2.dist-info/RECORD +8 -0
- yt_dlp_utils-0.0.1.dist-info/RECORD +0 -8
- {yt_dlp_utils-0.0.1.dist-info → yt_dlp_utils-0.0.2.dist-info}/LICENSE.txt +0 -0
- {yt_dlp_utils-0.0.1.dist-info → yt_dlp_utils-0.0.2.dist-info}/WHEEL +0 -0
yt_dlp_utils/__init__.py
CHANGED
yt_dlp_utils/lib.py
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: yt-dlp-utils
|
|
3
|
-
Version: 0.0.
|
|
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
|
[](https://pypi.org/project/yt-dlp-utils/)
|
|
35
35
|
[](https://github.com/Tatsh/yt-dlp-utils/tags)
|
|
36
36
|
[](https://github.com/Tatsh/yt-dlp-utils/blob/master/LICENSE.txt)
|
|
37
|
-
[](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
|

|
|
39
39
|
[](http://mypy-lang.org/)
|
|
40
40
|
[](https://github.com/pre-commit/pre-commit)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
yt_dlp_utils/__init__.py,sha256=8c-6Rvh7SxqgiLTioeHhUh265Dax4XEx6BeV0Dqi-Sg,250
|
|
2
|
+
yt_dlp_utils/constants.py,sha256=CXWDlIFPB_Aom_dfa9RwACX8i8DANivmlT0GQxnrYDg,729
|
|
3
|
+
yt_dlp_utils/lib.py,sha256=YU2tX7M_71-Ev_OSOYxyVh7s_tca-Dahv-12I_T9nsY,4359
|
|
4
|
+
yt_dlp_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
yt_dlp_utils-0.0.2.dist-info/LICENSE.txt,sha256=1z3v176A2bAtCVZXlb8HZXUf3HpQIjW2GanQd8PaVK4,1087
|
|
6
|
+
yt_dlp_utils-0.0.2.dist-info/METADATA,sha256=JSqmG1S4Tmg30MKfQFuV6pX7IpeHM-5pl64kNRoWKgg,3823
|
|
7
|
+
yt_dlp_utils-0.0.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
8
|
+
yt_dlp_utils-0.0.2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
yt_dlp_utils/__init__.py,sha256=0aI_jpTZ6mJ_xJ1tUTQI2boXO14JfvDwlGRaUYA5R74,250
|
|
2
|
-
yt_dlp_utils/constants.py,sha256=CXWDlIFPB_Aom_dfa9RwACX8i8DANivmlT0GQxnrYDg,729
|
|
3
|
-
yt_dlp_utils/lib.py,sha256=4ExLDxdE1V0CBjD5YAYy17xBTKrZNPS_ZRHrUWBI7jU,4759
|
|
4
|
-
yt_dlp_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
yt_dlp_utils-0.0.1.dist-info/LICENSE.txt,sha256=1z3v176A2bAtCVZXlb8HZXUf3HpQIjW2GanQd8PaVK4,1087
|
|
6
|
-
yt_dlp_utils-0.0.1.dist-info/METADATA,sha256=NrPGuFtXFQgo3C0fkV23VDbtcr3Nz9xpG5bjMYjptwE,3823
|
|
7
|
-
yt_dlp_utils-0.0.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
8
|
-
yt_dlp_utils-0.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|