Git Product home page Git Product logo

phantomflix's Introduction

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

phantomflix's People

Contributors

bbalduzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

phantomflix's Issues

LoginError

After several tries Ive got an Login Error:
[....]
\phantomflix-main\phantomflix\netflix.py", line 717, in load_playlist
raise LoginError(manifest.get("error", {}).get("display", error))
phantomflix.errors.LoginError: Email or password is incorrect.

Did Netflix change something on their login system? Because Ive verified my login credentials several times and with the same, I can still login but somehow it would not work.

[EDIT]
Ive found the Issue about the restriction to 540p. But even with lower resolutions it would not work.

[....]
\phantomflix-main\phantomflix\netflix.py", line 718, in load_playlist
raise MSLClientError(manifest.get("error", {}).get("display", error))
phantomflix.errors.MSLClientError: User authentication cannot be handled during failover

Are there any fixes?

Login Error

quando avvio main.py mi ritorna come errore:

Starting process... [phantomflix 2023.1.4]
Traceback (most recent call last):
File "/home/simone/phantomflix-main/main.py", line 20, in
asyncio.run(main())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/home/simone/phantomflix-main/main.py", line 19, in main
await viewables[0].download()
File "/home/simone/phantomflix-main/phantomflix/netflix.py", line 315, in download
playlist = Parse(self.client.msl.load_playlist(self.vid), self.client)
File "/home/simone/phantomflix-main/phantomflix/netflix.py", line 717, in load_playlist
raise LoginError(manifest.get("error", {}).get("display", error))
phantomflix.errors.LoginError: Email or password is incorrect.

email e password inserite nel file "main.py" sono corrette

Garbage repo

thank you for cloning my original FlixCrack without any permission even after removal. Btw it's very embarassing promoting L3 selling XDD

User Authentication

Can cookies be used as proof of user identity?
This scheme is identified by the string NETFLIXID.

Iterable from collection

Traceback (most recent call last):
File "G:\Python\phantomflix-main\main.py", line 1, in
from phantomflix import NetflixClient
File "G:\Python\phantomflix-main\phantomflix_init_.py", line 1, in
from .netflix import NetflixClient
File "G:\Python\phantomflix-main\phantomflix\netflix.py", line 23, in
from hyper.contrib import HTTP20Adapter
File "C:\Users\Hygro\AppData\Local\Programs\Python\Python312\Lib\site-packages\hyper-0.7.0-py3.12.egg\hyper_init_.py", line 11, in
from .common.connection import HTTPConnection
File "C:\Users\Hygro\AppData\Local\Programs\Python\Python312\Lib\site-packages\hyper-0.7.0-py3.12.egg\hyper\common\connection.py", line 9, in
from ..http11.connection import HTTP11Connection
File "C:\Users\Hygro\AppData\Local\Programs\Python\Python312\Lib\site-packages\hyper-0.7.0-py3.12.egg\hyper\http11\connection.py", line 13, in
from collections import Iterable, Mapping
ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\Hygro\AppData\Local\Programs\Python\Python312\Lib\collections_init_.py)

Cookies dont work in msl_request()

I changed the userauthdata to header["userauthdata"] = {
"scheme": "NETFLIXID",
"authdata": {
"netflixid": read_data('cookies.txt')['NetflixId'],
"securenetflixid": read_data('cookies.txt')['SecureNetflixId']
}
}
But then I get the error message phantomflix.errors.LoginError: User authentication data does not match entity identity.
Is there a workaround or smth? (since email_password doesnt work)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.