podflow 20250703__py3-none-any.whl → 20250705__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.
- podflow/netscape/update_netscape.py +20 -0
- podflow/templates/index.html +1 -1
- podflow/youtube/login.py +11 -5
- {podflow-20250703.dist-info → podflow-20250705.dist-info}/METADATA +1 -1
- {podflow-20250703.dist-info → podflow-20250705.dist-info}/RECORD +8 -7
- {podflow-20250703.dist-info → podflow-20250705.dist-info}/WHEEL +0 -0
- {podflow-20250703.dist-info → podflow-20250705.dist-info}/entry_points.txt +0 -0
- {podflow-20250703.dist-info → podflow-20250705.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
# podflow/netscape/update_netscape.py
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
from http.cookiejar import MozillaCookieJar
|
5
|
+
|
6
|
+
|
7
|
+
# 更新Netscape_HTTP_Cookie模块
|
8
|
+
def update_netscape(response_cookies, file: str):
|
9
|
+
netscape_cookie_jar = MozillaCookieJar(file)
|
10
|
+
try:
|
11
|
+
netscape_cookie_jar.load(ignore_discard=True, ignore_expires=True)
|
12
|
+
except Exception:
|
13
|
+
return False
|
14
|
+
for cookie in response_cookies:
|
15
|
+
netscape_cookie_jar.set_cookie(cookie)
|
16
|
+
try:
|
17
|
+
netscape_cookie_jar.save(ignore_discard=True, ignore_expires=True)
|
18
|
+
return True
|
19
|
+
except Exception:
|
20
|
+
return False
|
podflow/templates/index.html
CHANGED
podflow/youtube/login.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# podflow/youtube/login.py
|
2
2
|
# coding: utf-8
|
3
3
|
|
4
|
-
import shutil
|
5
4
|
from podflow.basic.write_log import write_log
|
6
5
|
from podflow.basic.time_print import time_print
|
7
6
|
from podflow.basic.http_client import http_client
|
8
7
|
from podflow.netscape.get_cookie_dict import get_cookie_dict
|
8
|
+
from podflow.netscape.update_netscape import update_netscape
|
9
9
|
|
10
10
|
|
11
11
|
def get_youtube_cookie_fail(arg0):
|
@@ -18,7 +18,7 @@ def get_youtube_cookie_fail(arg0):
|
|
18
18
|
def get_youtube_cookie(channelid_youtube_ids):
|
19
19
|
if not channelid_youtube_ids:
|
20
20
|
return
|
21
|
-
youtube_cookie = get_cookie_dict("channel_data/
|
21
|
+
youtube_cookie = get_cookie_dict("channel_data/yt_dlp_youtube.txt")
|
22
22
|
if youtube_cookie is None:
|
23
23
|
write_log("YouTube \033[31m获取cookie失败\033[0m")
|
24
24
|
return None
|
@@ -27,11 +27,17 @@ def get_youtube_cookie(channelid_youtube_ids):
|
|
27
27
|
):
|
28
28
|
html_content = response.text
|
29
29
|
if '"LOGGED_IN":true' in html_content:
|
30
|
-
|
31
|
-
|
32
|
-
"channel_data/youtube_cookie.txt",
|
30
|
+
updata_data = update_netscape(
|
31
|
+
response.cookies,
|
33
32
|
"channel_data/yt_dlp_youtube.txt",
|
34
33
|
)
|
34
|
+
if updata_data:
|
35
|
+
time_print("YouTube \033[32m获取cookie成功\033[0m")
|
36
|
+
else:
|
37
|
+
return get_youtube_cookie_fail("更新YouTube cookie失败")
|
38
|
+
new_youtube_cookie = response.cookies.get_dict()
|
39
|
+
for my_cookie_name, my_cookie_value in new_youtube_cookie.items():
|
40
|
+
youtube_cookie[my_cookie_name] = my_cookie_value
|
35
41
|
return youtube_cookie
|
36
42
|
elif '"LOGGED_IN":false' in html_content:
|
37
43
|
return get_youtube_cookie_fail("登陆YouTube失败")
|
@@ -79,13 +79,14 @@ podflow/message/xml_rss.py,sha256=ogCteSUXyJJXLhOE7-ZBcRdWYzrRr2Qykjt3oppRpC4,16
|
|
79
79
|
podflow/netscape/__init__.py,sha256=SUw_BtbV3moA324UdxRECkPLv1xHkjio8r_5JTkVfxI,47
|
80
80
|
podflow/netscape/bulid_netscape.py,sha256=wmUPlDGF8G456GGyajU_6Ak5WJzsqsq4bZgPjCSTGhI,2279
|
81
81
|
podflow/netscape/get_cookie_dict.py,sha256=laqw-eriABiLyciRLzDmistVHHWqmUM-9eEbYZzsqBQ,643
|
82
|
+
podflow/netscape/update_netscape.py,sha256=b7RL0Rm0pSOyRH9-sgflqtzB8EoyPhSFJgQTSfjFsy4,592
|
82
83
|
podflow/remove/__init__.py,sha256=x1pMfpIyE6xUrmIOkdl43mbvKLwndGo5pIoOBXhJsP4,45
|
83
84
|
podflow/remove/remove_dir.py,sha256=zqgf47UgxiGiLipb1FeoWKzrSHSxcHaEuu0261bqR1s,1105
|
84
85
|
podflow/remove/remove_file.py,sha256=ZusvZsBQX_yRdLuboD7bZKiOX4z4Rxg66zZK9KDWHwE,1006
|
85
86
|
podflow/remove/remove_flush.py,sha256=HWCe5SjNJ3VXaXbgFtqGdTXeJ1R2vv5qllNilB-G0_g,1851
|
86
87
|
podflow/repair/__init__.py,sha256=Gpc1i6xiSLodKjjmzH66c_Y1z0HQ9E9CS3p95FRnVFM,45
|
87
88
|
podflow/repair/reverse_log.py,sha256=Wc_vAH0WB-z1fNdWx7FYaVH4caRPtot7tDwDwFhmpz4,1106
|
88
|
-
podflow/templates/index.html,sha256=
|
89
|
+
podflow/templates/index.html,sha256=6GS2aq_mJBnI3STK_FsjNQY8xrMk3wxYBx3TtJ_qq28,2831
|
89
90
|
podflow/templates/css/config.css,sha256=-xjFlrbP2BAeTYTLs2M2u-4--klwSSC7HE2av58QUF0,5224
|
90
91
|
podflow/templates/css/index.css,sha256=wibmhsKu-jlnX6dbxMExlvO1Lbx2kw_TEbVGomyXd7M,10424
|
91
92
|
podflow/templates/js/config.js,sha256=VZmpvtQWszofoccjJZNhbjvNkpl-CjGOdTrPkI83ND4,43634
|
@@ -107,9 +108,9 @@ podflow/upload/upload_server.py,sha256=BFq3QrWE7U97LbC4EQiDhQXbLapEc4R00eRDBH12E
|
|
107
108
|
podflow/youtube/__init__.py,sha256=pgXod8gq0IijZxIkPSwgAOcb9JI5rd1mqMomoR7bcJ4,46
|
108
109
|
podflow/youtube/build.py,sha256=j6SVq3HFFGlNNqRrHfnBIThdzsH88PFmwLnejosif1U,12311
|
109
110
|
podflow/youtube/get.py,sha256=oO32GjTFvUgP5AfFX5AlIuXU2UT6QtOUOXWLFzi8XtI,17157
|
110
|
-
podflow/youtube/login.py,sha256=
|
111
|
-
podflow-
|
112
|
-
podflow-
|
113
|
-
podflow-
|
114
|
-
podflow-
|
115
|
-
podflow-
|
111
|
+
podflow/youtube/login.py,sha256=WGSa17wuTZPzkvra1Cx4rSrFcCFw1E_lw8fo8FYrl54,1830
|
112
|
+
podflow-20250705.dist-info/METADATA,sha256=xzWFm-eXaTeNz14CvbP05GcgKCcyMv8-OPaBqRMiN34,14195
|
113
|
+
podflow-20250705.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
114
|
+
podflow-20250705.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
|
115
|
+
podflow-20250705.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
|
116
|
+
podflow-20250705.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|