docs: Update README with Python and yt-dlp installation instructions

This commit is contained in:
Peifan Li
2025-12-02 13:02:58 -05:00
parent 26184ba3c5
commit 5341bf842b
3 changed files with 18 additions and 7 deletions

View File

@@ -74,6 +74,8 @@ mytube/
- Node.js (v14 or higher)
- npm (v6 or higher)
- Docker (optional, for containerized deployment)
- Python 3.8+ (for yt-dlp and PO Token provider)
- yt-dlp (installed via pip/pipx)
### Installation
@@ -100,6 +102,16 @@ mytube/
cd ../backend && npm install
```
**Note**: The backend installation will automatically build the `bgutil-ytdlp-pot-provider` server. However, you must ensure `yt-dlp` and the `bgutil-ytdlp-pot-provider` python plugin are installed in your environment:
```bash
# Install yt-dlp and the plugin
pip install yt-dlp bgutil-ytdlp-pot-provider
# OR using pipx (recommended)
pipx install yt-dlp
pipx inject yt-dlp bgutil-ytdlp-pot-provider
```
#### Using npm Scripts
You can use npm scripts from the root directory:

View File

@@ -9,16 +9,15 @@ COPY package*.json ./
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
# Skip Python check for youtube-dl-exec during build
ENV YOUTUBE_DL_SKIP_PYTHON_CHECK=1
RUN apk add --no-cache git
RUN npm ci
# Clone and build bgutil-ytdlp-pot-provider
RUN git clone --single-branch --branch 1.2.2 https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git /app/bgutil-ytdlp-pot-provider
COPY . .
# Build bgutil-ytdlp-pot-provider
WORKDIR /app/bgutil-ytdlp-pot-provider/server
RUN npm install && npx tsc
WORKDIR /app
COPY . .
RUN npm run build
# Stage 2: Production
@@ -34,8 +33,7 @@ RUN apk add --no-cache \
chromium \
ffmpeg \
python3 \
py3-pip \
git && \
py3-pip && \
ln -sf python3 /usr/bin/python
# Install yt-dlp and bgutil-ytdlp-pot-provider

View File

@@ -8,7 +8,8 @@
"build": "tsc",
"generate": "drizzle-kit generate",
"test": "vitest",
"test:coverage": "vitest run --coverage"
"test:coverage": "vitest run --coverage",
"postinstall": "cd bgutil-ytdlp-pot-provider/server && npm install && npx tsc"
},
"keywords": [],
"author": "",