Spaces:
Runtime error
Runtime error
Delanoe Pirard
commited on
Commit
·
a14d455
1
Parent(s):
c47d903
cookies.txt
Browse files- agents/__pycache__/advanced_validation_agent.cpython-311.pyc +0 -0
- agents/__pycache__/code_agent.cpython-311.pyc +0 -0
- agents/__pycache__/image_analyzer_agent.cpython-311.pyc +0 -0
- agents/__pycache__/long_context_management_agent.cpython-311.pyc +0 -0
- agents/__pycache__/math_agent.cpython-311.pyc +0 -0
- agents/__pycache__/planner_agent.cpython-311.pyc +0 -0
- agents/__pycache__/reasoning_agent.cpython-311.pyc +0 -0
- agents/__pycache__/research_agent.cpython-311.pyc +0 -0
- agents/__pycache__/role_agent.cpython-311.pyc +0 -0
- agents/__pycache__/text_analyzer_agent.cpython-311.pyc +0 -0
- agents/__pycache__/video_analyzer_agent.cpython-311.pyc +0 -0
- cookies.txt +22 -11
- get_cookie.py +19 -3
agents/__pycache__/advanced_validation_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/advanced_validation_agent.cpython-311.pyc and b/agents/__pycache__/advanced_validation_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/code_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/code_agent.cpython-311.pyc and b/agents/__pycache__/code_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/image_analyzer_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/image_analyzer_agent.cpython-311.pyc and b/agents/__pycache__/image_analyzer_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/long_context_management_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/long_context_management_agent.cpython-311.pyc and b/agents/__pycache__/long_context_management_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/math_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/math_agent.cpython-311.pyc and b/agents/__pycache__/math_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/planner_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/planner_agent.cpython-311.pyc and b/agents/__pycache__/planner_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/reasoning_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/reasoning_agent.cpython-311.pyc and b/agents/__pycache__/reasoning_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/research_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/research_agent.cpython-311.pyc and b/agents/__pycache__/research_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/role_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/role_agent.cpython-311.pyc and b/agents/__pycache__/role_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/text_analyzer_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/text_analyzer_agent.cpython-311.pyc and b/agents/__pycache__/text_analyzer_agent.cpython-311.pyc differ
|
|
|
agents/__pycache__/video_analyzer_agent.cpython-311.pyc
CHANGED
|
Binary files a/agents/__pycache__/video_analyzer_agent.cpython-311.pyc and b/agents/__pycache__/video_analyzer_agent.cpython-311.pyc differ
|
|
|
cookies.txt
CHANGED
|
@@ -2,15 +2,26 @@
|
|
| 2 |
# This file is generated by yt-dlp. Do not edit.
|
| 3 |
|
| 4 |
.youtube.com TRUE / TRUE 1772810415 SOCS CAESEwgDEgk3MjI0NDY2OTcaAmZyIAEaBgiAsYW9Bg
|
| 5 |
-
.youtube.com TRUE / TRUE
|
| 6 |
-
.youtube.com TRUE / TRUE
|
| 7 |
-
.youtube.com TRUE / TRUE
|
| 8 |
-
.youtube.com TRUE /
|
| 9 |
-
.youtube.com TRUE / TRUE
|
| 10 |
-
.youtube.com TRUE / TRUE
|
| 11 |
-
.youtube.com TRUE /
|
| 12 |
-
.youtube.com TRUE / TRUE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
.youtube.com TRUE / FALSE 0 PREF f4=4000000&tz=UTC&f7=100&f6=400&f5=30000&hl=en
|
| 14 |
-
.youtube.com TRUE / TRUE
|
| 15 |
-
.youtube.com TRUE / TRUE
|
| 16 |
-
.youtube.com TRUE /
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
# This file is generated by yt-dlp. Do not edit.
|
| 3 |
|
| 4 |
.youtube.com TRUE / TRUE 1772810415 SOCS CAESEwgDEgk3MjI0NDY2OTcaAmZyIAEaBgiAsYW9Bg
|
| 5 |
+
.youtube.com TRUE / TRUE 1773242519 LOGIN_INFO AFmmF2swRQIhAN5tw3v4vzvqkE9jFGTfwRfuSlsgvo8oZFND0KLeJSiZAiBe35g8ohBeSsOxXaaBST6ZIwRjsaj8TciBG4Qbwf6K0A:QUQ3MjNmeWJBWWxHS19XRTc3X2dQbzBiMDQwVDlLWmJfcEhzSVI1NWsyR2otbFQyVnlqdFpqandUMWtELXZqcEJsZjVaSl9rQzF2UFRULXdNbU9fRTk4Y2VtUHcxa1JUb2JIbWZDZ1JLeGpZUVhYS2x3RlltSktBZ1VFcnRqVUc0RkZzRWdxQjJYdmVOMUVOc0E1TER3a05nSnZBOGVicDA2c21sN2tYelhWRjhtU202cmJRVm9OcjBGMjR6WEtlRGFOazkyZTE3OGE4OURqMW5zVDdNdkNtRk55LWRIcU1oUQ==
|
| 6 |
+
.youtube.com TRUE / TRUE 1762623376 __Secure-ROLLOUT_TOKEN CK2CtoGE9_qCKBDVmd6PqaqLAxiv56aGvJ6NAw%3D%3D
|
| 7 |
+
.youtube.com TRUE / TRUE 1762623377 VISITOR_INFO1_LIVE XJWWeg-61Jo
|
| 8 |
+
.youtube.com TRUE / FALSE 1781171326 SID g.a000wgiyYfwWbhaK50WfWqfX9wGtc5AN9kBMrz73fEyP_cRPUjni8ppqkSKdDM9ksOR38k2NPQACgYKAfsSARASFQHGX2MicxUQ0e-BNo8Wi9EniKaX3BoVAUF8yKpXumEKYDuFms-e_KKcVMJF0076
|
| 9 |
+
.youtube.com TRUE / TRUE 1781171326 __Secure-1PSID g.a000wgiyYfwWbhaK50WfWqfX9wGtc5AN9kBMrz73fEyP_cRPUjnihPJmq-OGf0cC6C2aYqH-yAACgYKAQcSARASFQHGX2MijJRbqQNyo9BHMzvkk9HXUBoVAUF8yKpPaBvpsOcQqoYQe2pZOfNL0076
|
| 10 |
+
.youtube.com TRUE / TRUE 1781171326 __Secure-3PSID g.a000wgiyYfwWbhaK50WfWqfX9wGtc5AN9kBMrz73fEyP_cRPUjnix4LQh8UGsF1ttmxm5asDFwACgYKAfgSARASFQHGX2MimceB5eU37gApYiJGCnGDihoVAUF8yKoXYXFKC51Fi3JAsb3l7faw0076
|
| 11 |
+
.youtube.com TRUE / FALSE 1781171326 HSID Ab7ZwZGNdOqOepsnI
|
| 12 |
+
.youtube.com TRUE / TRUE 1781171326 SSID AFzWuPosAEyblSdei
|
| 13 |
+
.youtube.com TRUE / FALSE 1781171326 APISID KMF74B5OX-1VVqvj/A-UEVQybq5JHzj9Wu
|
| 14 |
+
.youtube.com TRUE / TRUE 1781171326 SAPISID qU-9iyk0zB5n9bf-/ApnBCKOoR_j1JOL-B
|
| 15 |
+
.youtube.com TRUE / TRUE 1781171326 __Secure-1PAPISID qU-9iyk0zB5n9bf-/ApnBCKOoR_j1JOL-B
|
| 16 |
+
.youtube.com TRUE / TRUE 1781171326 __Secure-3PAPISID qU-9iyk0zB5n9bf-/ApnBCKOoR_j1JOL-B
|
| 17 |
+
.youtube.com TRUE / TRUE 1772810410 __Secure-YEC CgtaV0NPeGJVRncxZyiQ44jBBjInCgJCRRIhEh0SGwsMDg8QERITFBUWFxgZGhscHR4fICEiIyQlJiAy
|
| 18 |
+
.youtube.com TRUE / TRUE 1762623377 VISITOR_PRIVACY_METADATA CgJCRRIhEh0SGwsMDg8QERITFBUWFxgZGhscHR4fICEiIyQlJiBt
|
| 19 |
.youtube.com TRUE / FALSE 0 PREF f4=4000000&tz=UTC&f7=100&f6=400&f5=30000&hl=en
|
| 20 |
+
.youtube.com TRUE / TRUE 1778523295 __Secure-1PSIDTS sidts-CjIBjplskP5leNpNJR7A8SAOi4nSBclIGFlSIPpRGgGzScWBBunwftTQ_iQ1ZvT-fl1OixAA
|
| 21 |
+
.youtube.com TRUE / TRUE 1778523295 __Secure-3PSIDTS sidts-CjIBjplskP5leNpNJR7A8SAOi4nSBclIGFlSIPpRGgGzScWBBunwftTQ_iQ1ZvT-fl1OixAA
|
| 22 |
+
.youtube.com TRUE / FALSE 1778607377 SIDCC AKEyXzUPGqBCiHXeg-8zssIT17MYXXoYe8rZyyXMP8vGX8FNMBnsZKsqh4UFOlvPpyHaly2iGLM
|
| 23 |
+
.youtube.com TRUE / TRUE 1778607377 __Secure-1PSIDCC AKEyXzUg6hr-9Mtvi0-PtgukS1-akAVmJgNw-4jrqXh9Y1mkIcCjIvu_Ja3llDZkAMipdWDT67Q
|
| 24 |
+
.youtube.com TRUE / TRUE 1778607377 __Secure-3PSIDCC AKEyXzXBPt7yG6_g8XWIlbg8Wi-1L7V7bsYIWdOUFeusodlbLIpr35DWkI18YtNi7y6E1xIf-vSF
|
| 25 |
+
.youtube.com TRUE / TRUE 0 YSC tlWtxpP8Xmk
|
| 26 |
+
.youtube.com TRUE / TRUE 1810143377 __Secure-YT_TVFAS t=483201&s=2
|
| 27 |
+
.youtube.com TRUE / TRUE 1762623377 DEVICE_INFO ChxOelV3TXpZeE5EUXlPRFkwTmpVM05UUTRNUT09EJHjiMEGGJHjiMEG
|
get_cookie.py
CHANGED
|
@@ -2,6 +2,9 @@ import tempfile
|
|
| 2 |
import browser_cookie3
|
| 3 |
from yt_dlp import YoutubeDL
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
def export_youtube_cookies_netscape(domain: str = "youtube.com") -> str:
|
| 6 |
"""
|
| 7 |
Exporte les cookies du navigateur (Chrome/Firefox) pour le domaine
|
|
@@ -36,7 +39,7 @@ def export_youtube_cookies_netscape(domain: str = "youtube.com") -> str:
|
|
| 36 |
return tmp.name
|
| 37 |
|
| 38 |
|
| 39 |
-
def
|
| 40 |
"""Convert cookie file content to environment variable format"""
|
| 41 |
try:
|
| 42 |
with open(cookie_file_path, 'r') as f:
|
|
@@ -51,7 +54,7 @@ def cookies_to_env(cookie_file_path: str) -> str:
|
|
| 51 |
content = '\\n'.join(header + [''] + cookies) # Empty line after headers
|
| 52 |
|
| 53 |
# Create env file content
|
| 54 |
-
return
|
| 55 |
|
| 56 |
except Exception as e:
|
| 57 |
raise ValueError(f"Error converting cookie file: {str(e)}")
|
|
@@ -65,4 +68,17 @@ def save_to_env_file(env_content: str, env_file: str = '.env') -> None:
|
|
| 65 |
except Exception as e:
|
| 66 |
raise ValueError(f"Error saving to env file: {str(e)}")
|
| 67 |
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import browser_cookie3
|
| 3 |
from yt_dlp import YoutubeDL
|
| 4 |
|
| 5 |
+
from agents.video_analyzer_agent import env_to_cookies_from_env
|
| 6 |
+
|
| 7 |
+
|
| 8 |
def export_youtube_cookies_netscape(domain: str = "youtube.com") -> str:
|
| 9 |
"""
|
| 10 |
Exporte les cookies du navigateur (Chrome/Firefox) pour le domaine
|
|
|
|
| 39 |
return tmp.name
|
| 40 |
|
| 41 |
|
| 42 |
+
def cookies_to_content(cookie_file_path: str) -> str:
|
| 43 |
"""Convert cookie file content to environment variable format"""
|
| 44 |
try:
|
| 45 |
with open(cookie_file_path, 'r') as f:
|
|
|
|
| 54 |
content = '\\n'.join(header + [''] + cookies) # Empty line after headers
|
| 55 |
|
| 56 |
# Create env file content
|
| 57 |
+
return content
|
| 58 |
|
| 59 |
except Exception as e:
|
| 60 |
raise ValueError(f"Error converting cookie file: {str(e)}")
|
|
|
|
| 68 |
except Exception as e:
|
| 69 |
raise ValueError(f"Error saving to env file: {str(e)}")
|
| 70 |
|
| 71 |
+
def content_to_cookies(env_content: str, output_file: str) -> None:
|
| 72 |
+
"""Convert environment variable content back to cookie file"""
|
| 73 |
+
try:
|
| 74 |
+
# Replace escaped newlines with actual newlines
|
| 75 |
+
cookie_content = env_content.replace('\\n', '\n')
|
| 76 |
+
|
| 77 |
+
# Write to cookie file
|
| 78 |
+
with open(output_file, 'w') as f:
|
| 79 |
+
f.write(cookie_content)
|
| 80 |
+
|
| 81 |
+
except Exception as e:
|
| 82 |
+
raise ValueError(f"Error converting to cookie file: {str(e)}")
|
| 83 |
+
|
| 84 |
+
content_to_cookies(cookies_to_content(export_youtube_cookies_netscape("youtube.com")), "cookies.txt")
|