Coder Social home page Coder Social logo

netflix-to-srt's Introduction

netflix-to-srt

  1. Get the subtitles from netflix
  2. Convert them into .srt

Get the subtitles from netflix

Method 1

You need Google Chrome. not tested on other web browsers

  1. Open devtools. This is usually accomplished by either:
    • Pressing Cmd + Alt + i.
    • Pressing F12.
  2. Go to Network tab within dev tools.
  3. Load your movie/episode.
  4. Select the subtitle you want.
  5. In devtools sort by name and look for a file with ?o= at the beginning of the name (see image below).

Chrome console screenshot

Method 2

The information is extracted from this post.

You need FireFox and AdblockPlus Add-On. not tested on other browsers

  • Start Netflix and your movie/episode (stream is active!)
  • Start AdblockPlus, open blockable items
  • Search: dfxp (e.g. >> #.nflximg.com/#/#/########.dfxp?v=1&e=#########&t=######_#####&random=1234567890)
  • open the dfxp in a new window
  • Save as

Convert them into .srt

  • Get python (tested under both 2.7 and 3.3). If you have mac or linux you may skip this step
  • Clone this repository or download to_srt.py
  • Run the script in the terminal (python to_srt.py)
    • Input and output files default to sample.xml and sample.xml.srt in the same directory this is run
    • Use -i INPUT_PATH and -o OUTPUT_PATH for custom file locations
  • Enjoy!

Why this repository?

VLC player could not reproduce that kind of xml subtitles and I could not find any tool that could easily transform the xml files to a suitable format (e.g. .srt) in linux or mac.

TODOs

  • Multiple files/directories at once
  • More robust file parsing than just some quick and dirty regexes
  • Javascript/web version so this can be done entirely through a browser
  • Tests (not just the "sample" files)
  • Create a pip package for this

Note:

In no way I am encouraging any kind of illegal activity. Please know your local laws and ask for written permissions from content owners (e.g. Netflix) when necessary.

netflix-to-srt's People

Contributors

oowowaee avatar

Stargazers

Isaac avatar

Watchers

James Cloos avatar  avatar

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.