-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
64 lines (58 loc) · 2.47 KB
/
.env.example
File metadata and controls
64 lines (58 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# YouTube Transcript Fetcher - Environment Variables
# -----------------------------------------------------------------------------
# WebShare Residential Proxy Configuration
# -----------------------------------------------------------------------------
# Get your credentials at: https://dashboard.webshare.io/proxy/settings
# Purchase "Residential" proxies (NOT "Proxy Server" or "Static Residential")
#
# IMPORTANT: Use residential proxies for reliable YouTube transcript fetching.
# Without proxies, you will encounter HTTP 429 (Too Many Requests) errors.
# Your WebShare proxy username (required for proxy)
WEBSHARE_PROXY_USERNAME=your_webshare_username_here
# Your WebShare proxy password (required for proxy)
WEBSHARE_PROXY_PASSWORD=your_webshare_password_here
# Optional: Filter by country codes (comma-separated, e.g., "US,CA,UK")
# Leave empty to use any available proxy location
WEBSHARE_PROXY_LOCATIONS=
# Optional: Number of retries when a proxy is blocked (default: 10)
WEBSHARE_PROXY_RETRIES=10
# -----------------------------------------------------------------------------
# Usage Instructions
# -----------------------------------------------------------------------------
#
# 1. Copy this file to .env:
# cp .env.example .env
#
# 2. Edit .env and add your WebShare credentials:
# WEBSHARE_PROXY_USERNAME=your_actual_username
# WEBSHARE_PROXY_PASSWORD=your_actual_password
#
# 3. Source the file before running the application:
# source .env # Linux/macOS
# # or
# set -a; source .env; set +a # Some shells
#
# 4. Run your application:
# # CLI
# python -m youtube_transcript.cli fetch "https://youtu.be/dQw4w9WgXcQ"
#
# # API
# uvicorn youtube_transcript.api.app:create_app --host localhost --port 8888
#
# -----------------------------------------------------------------------------
# Troubleshooting
# -----------------------------------------------------------------------------
#
# Q: Still getting HTTP 429 errors with proxy?
# A: Make sure you purchased "Residential" proxies, NOT "Proxy Server" or "Static Residential"
#
# Q: How much does WebShare cost?
# A: ~$5-10 per GB of data transfer. Free trial available.
#
# Q: Can I use a different proxy service?
# A: Yes, but you'll need to modify the code to use GenericProxyConfig instead of WebshareProxyConfig
#
# Q: Do I need a proxy for local development?
# A: Only if you're hitting rate limits. Your residential IP is usually fine.
#
# -----------------------------------------------------------------------------