Metadata-Version: 2.4
Name: pinchana-ytmusic
Version: 26.11.15
Summary: YouTube Music downloader for Pinchana
License-Expression: MIT
License-File: LICENSE
Requires-Dist: pinchana-core
Requires-Dist: fastapi>=0.162.2
Requires-Dist: uvicorn>=0.54.0
Requires-Python: >=3.13
Project-URL: Repository, https://github.com/Pinchana/pinchana-api
Project-URL: Issues, https://github.com/Pinchana/pinchana-api/issues
Description-Content-Type: text/markdown

# Pinchana YouTube Music

This FastAPI module extracts audio from supported public `music.youtube.com` URLs and stores the result in the shared Pinchana cache. It is separate from the browser DLP workflow used for ordinary YouTube and `youtu.be` downloads.

## API

- `POST /scrape` accepts `{"url":"https://music.youtube.com/watch?v=VIDEO_ID"}`.
- `GET /health` reports service and VPN readiness.

Clients normally call the gateway's `POST /v1/scrape` route. The v1 response represents the audio as an ordered media asset and may include title, artist, and cover metadata.

## Development

```sh
uv sync --frozen
uv run uvicorn pinchana_ytmusic.main:app --host 0.0.0.0 --port 8085 --reload
```

```sh
# Run from the repository root.
docker build --file scrapers/pinchana-ytmusic/Dockerfile --tag pinchana-ytmusic:local .
```

Cookie and proxy configuration must remain outside version control. A public URL can still require authentication or fail because of regional restrictions or upstream rate limits.
