Awesome Open Source
Awesome Open Source


  1. Get the subtitles from Netflix (.xml dfxp or .vtt files), YouTube or other sources.
  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

From Netflix: 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. >>
  • open the dfxp in a new window
  • Save as

From YouTube

  • Install youtube-dl (available for Windows, Mac and Linux)
  • Download subs from the YouTube URL you like e.g. youtube-dl --all-subs ""
  • Subtitles should be downloaded in the same folder were the command was ran. E.g. NameOfTheVideo, NameOfTheVideo VHNfvFOBC0A.tlh.vtt
  • If you are missing a language, check that it's actually available. E.g. youtube-dl --list-subs ""

Convert them into .srt

  • Get python (tested under python 2.7, 3.3 and newer). If you have mac or linux you may skip this step
  • Clone this repository or download
  • Run the script in the terminal (type python from the terminal on the folder you have
    • Copy your subtitle files in the same directory as
      • Or use -i INPUT_PATH and -o OUTPUT_PATH for custom file locations
    • All .xml and .vtt files in the input directory will generate a converted .srt file on the output one
  • Enjoy! (And star the repo if you liked it ;D)

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. SubRip (.srt)) in Linux or Mac. I got a request for WebVTT (.vtt) and did the same.


  • More robust file parsing than just some quick and dirty regexes
  • Javascript/web version so this can be done entirely through a browser
  • Real tests. The way to "test" it now is by running python -i samples -o samples from the the project's root directory and check the .srt results (or python3 -i samples -o samples).
  • Create a pip package for this


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, YouTube) when necessary.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (51,910
hacktoberfest (4,195
python3 (1,570
youtube (355
regex (161
youtube-dl (74
netflix (46
subtitles (42
subtitle (38
srt (24

Find Open Source By Browsing 7,000 Topics Across 59 Categories