/phantomflix

Python Netflix API Metadata & Downloader for Windows and Linux

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Phantomflix

Python Netflix API Metadata & Downloader for Windows and Linux

FeaturesDependenciesHow To Use

Features

  • Get Metadata (title, year, episodes, seasons...) with official Netflix api
  • Get medias (videos, audios, audio descriptions, subtitles...)
  • Decrypt Widevine DRM protected content
  • Automatically mux all your tracks
  • Nice pre-made format for file names
  • Very fast multi-connection downloads

Dependencies

make sure to add these in the PATH on in your working directory

How to use

  1. Extract Cookies from Netflix:

    • Use an extension like cookie.txt to extract cookies from Netflix.
    • Save the extracted cookie file in your working directory.
  2. Obtain a Private L3 CDM (Content Decryption Module):

    • Option 1: Extract it yourself from an Android device using the dumper tool.
    • Option 2: Extract it yourself from an Android emulator. how to
    • Option 2: Contact me on Telegram: @edobal. I'll give you one, but you will need to be patient
  3. Setup the L3 CDM:

    • Place the L3 CDM file, named as device_name, inside the devices folder in your working environment.

Working folder example:

│   phantomflix/
│   cookies.txt
│   languages.txt
│   setup.py
│   main.py
└───devices/
    └───<device name>/
            device_client_id_blob
            device_private_key

Now open a terminal on the working dir and run:

  • py setup.py install
  • py main.py

where main.py looks like this:

from phantomflix import NetflixClient
import asyncio

client = NetflixClient(
    email="", # Insert your email here
    password="", # Insert your password here
    device="<device_name>", # Insert your CDM folder name here
    quality=1080,
    audio_language=["Italian"],
    language="it-IT", # Metadata language
    video_profile="high",
    quiet=False,
)

async def main():
    # movie
    viewables = client.get_viewables(81500601) # for serie add season=<season_number>, episode=<episode_number>
    for viewable in viewables: print(viewable.title)
    await viewables[0].download()
asyncio.run(main())

Support

We also accept donations, so we can keep this project up!

liberapay

ko-fi

paypal