fix: proxy support for transcript download, scroll-based mark-read, enable agent worker

This commit is contained in:
Gan, Jimmy
2026-07-09 03:39:08 +08:00
parent 672ad58ca4
commit 575fdabbc0
2 changed files with 26 additions and 10 deletions
+4
View File
@@ -44,6 +44,10 @@ for p in [os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__)
def download_transcript(video_id: str) -> str:
try:
session = requests.Session()
# Respect HTTP_PROXY/HTTPS_PROXY env vars
proxy = proxy_from_env()
if proxy:
session.proxies = {"http": proxy, "https": proxy}
session.headers.update({
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
"Accept-Language": "en-US,en;q=0.9"