This example program uses torproxy and YouTube Transcript API to fetch transcripts from a cloud machine. It bypasses YouTube's IP blocking on cloud services by routing traffic through the Tor network. Sometimes, requests may fail if the exit node's IP is blocked by YouTube.
This was successfully tested on a GitHub codespace.
- Docker
- Python 3.12+
- uv
- Clone the repository
git clone https://github.com/rinvii/yt-transcript.git
cd yt-transcript
- Set up tor proxy
docker compose up -d
- Run script
uv run main.py