Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iljan/narr
Download audio tracks from Netflix to sample your favorite shows
https://github.com/iljan/narr
chrome-devtools-protocol cli crawler downloader music
Last synced: 2 months ago
JSON representation
Download audio tracks from Netflix to sample your favorite shows
- Host: GitHub
- URL: https://github.com/iljan/narr
- Owner: IljaN
- License: unlicense
- Created: 2022-12-18T14:37:26.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-29T01:15:21.000Z (7 months ago)
- Last Synced: 2024-06-29T02:28:33.729Z (7 months ago)
- Topics: chrome-devtools-protocol, cli, crawler, downloader, music
- Language: Go
- Homepage:
- Size: 68.4 KB
- Stars: 38
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Narr
Netflix Audio Ripper - Download audio tracks from Netflix to sample your favourite shows. :musical_note:## Usage
Close all browser instances and start Chrome, Brave or Edge from the terminal with enabled remote debugging :
```bash
google-chrome --remote-debugging-port=9222
brave-browser --remote-debugging-port=9222
./msedge.exe --remote-debugging-port=9222
```- Make sure that you are logged in on Netflix in the started browser.
- Navigate to the show you want to download the audio from.
- Copy the URL of the show.
- Run narr with the URL as argument.```bash
narr "https://www.netflix.com/watch/12345678?trackId=12345678"
```Observe the progress in the terminal:
```bash
2023/02/18 18:34:25 ▼ Downloading https://www.netflix.com/watch/81237996?trackId=14170056 ⟾ /home/looper/81237996-14170056-4037200794235010051
2023/02/18 18:34:35 ✓ Finished https://www.netflix.com/watch/81237996?trackId=14170056 ⟾ /home/looper/81237996-14170056-4037200794235010051, got 65346400 bytes
```You can navigate to any other show or episode or change the language of the audio track while narr is running. It will
download the audio track of the currently playing episode.```bash
2023/02/18 18:34:25 ▼ Downloading https://www.netflix.com/watch/81237996?trackId=14170056 ⟾ /home/looper/81237996-14170056-4037200794235010051
2023/02/18 18:34:35 ✓ Finished https://www.netflix.com/watch/81237996?trackId=14170056 ⟾ /home/looper/81237996-14170056-4037200794235010051, got 65346400 bytes
2023/02/18 16:59:42 🗺Navigate to https://www.netflix.com/watch/81238005?trackId=14170056
2023/02/18 16:59:43 ▼ Downloading https://www.netflix.com/watch/81238005?trackId=14170056 ⟾ /home/looper/81238005-14170056-605394647632969758
2023/02/18 16:59:53 ✓ Finished https://www.netflix.com/watch/81238005?trackId=14170056 ⟾ /home/looper/81238005-14170056-605394647632969758, got 65346400 bytes
```It is also possible to navigate to the Netflix home page. Narr will then download audio tracks of trailers or previews.
## How it works
Narr uses the [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) to communicate with the
browser. It intercepts the network requests
and downloads the audio tracks in mp4 format. This is possible because the audio is not protected by DRM.## Build from source
Narr is written in Go. You can build it from source with the following commands:
```bash
git clone https://github.com/IljaN/narr.git
make build_all
```This builds binaries for Linux, Windows and MacOS (amd64 + arm64) and places them in the `bin` directory.
## Flags
```bash
narr --help
~/c/narr:λ ./narr --help
Usage: narr [--chrome-url CHROME-URL] VIDEOURL [DOWNLOADDIR]Positional arguments:
VIDEOURL url of the video to download audio from. Must be a netflix url. e.g. https://www.netflix.com/watch/12345678?trackId=12345678
DOWNLOADDIR directory where to download the audio files. Defaults to current working directory.Options:
--chrome-url CHROME-URL, -c CHROME-URL
url of the chrome debugger. [default: http://127.0.0.1:9222]
--help, -h display this help and exit
```