Download Japanese subtitles as TEXT from Netflix using a Kodi plugin

Updated 1/7/19: I no longer recommend using the method below, and I may not provide any further updates. I now recommend Subadub for studying Japanese from Netflix subtitles. If you want to batch-download subtitles in any language, I recommend Netflix Subtitle Downloader.

I just want the subs!

I have already downloaded Japanese subtitles from over 100 shows and movies, including many native Japanese Netflix originals, and you can grab them all here.

I want to do it myself!

This process involves installing a home theater application called Kodi, and then installing a plugin for it that will allow you to sign into Netflix and then automatically save SRT subtitles for any files videos that you try to play.

The NetflixSubs plugin and installation instructions have been moved to a GitHub page here: https://github.com/Zarxrax/NetflixSubs

Just click through to that page and scroll down for instructions on how to download and install the plugin.

Here is a video tutorial by Matt VS Japan, which shows how to install Kodi and the NetflixSubs plugin, and download subtitles. This uses an older version of the plugin, and some things have changed, but this still gives you a basic overview of how to get things set up.

354 thoughts to “Download Japanese subtitles as TEXT from Netflix using a Kodi plugin”

    1. I have verified that the plugin is still working for me. Since I can not reproduce the issue there is nothing I can do. I recommend just uninstall and reinstall everything again and see if its working then.

        1. I’ve used several different versions of kodi 18 successfully. Right now I’m using the RC2 64-bit version for windows. I also updated the plugin yesterday, but I don’t expect that it fixed anything.

        2. What is the language of your windows 10? Where are you from? Are you using any VPN?

          Go to this folder

          C:\Users\Essam\AppData\Roaming\

          C:\Users\Essam\AppData\Roaming\Kodi\

          and delete or rename “Kodi” folder, open Kodi and install this version, install inputstream adaptive, and try to play a video, install widevine, if not playing, restart Kodi and try to play any video again, and report if you can play the videos or not,

          https://mega.nz/#!ptcx1aZR!rVPoAd-WIApD1PbCNzAjHrlKcLKSiRr6EGySB2fHof0

          1. I have the latest version of Kodi (2019-Jan-05 10:11) and for some reason the option for input stream adaptive isn´t listed. I have looked under Add-ons -> my add-ons -> all

            Without input stream adaptive it doesnt seem to be working for me and I cant figure out why the option isnt showing for me

          2. You do not need to install inputstream adaptive to download the subtitles, you only need it to play the videos, you see this option only after Kodi automatically updating itself when you open it for the first time, wait a minute before installing Netflix plugin, after installing the add-on, install inputstream adaptive (only if you will use the add-on for playing the videos) , use this release it works for me now.

            http://mirrors.kodi.tv/nightlies/windows/win64/master/KodiSetup-20181216-edc90911-master-x64.exe

          3. To install inputstream.adaptive, after Kodi updates itself, from the main window press on “Add-ons” then stand on “Download”, and press on “VideoPlayer InputStream” then press on “InputStream Adaptive”, and press on “Install”, see this photo.

            https://i.ibb.co/5RM07Q3/stream.jpg

          4. Thanks, I have managed to download input stream adaptive and am able to play videos now but still not able to download subtitles. I am using 0.14.1 for the netflix addon and the version of kodi you linked above and it doesnt work.

            Once the video is playing I clicked and selected subtitles to the one I want and then when I click download it comes up with another screen that has a column on the left with the heading “services”, but nothing in the column then a button on the right that sways “manual search string”. I have had a look around but cant seem to find out how to download subtitles from here

          5. Netflix 0.14.1 was for testing your PC only by making sure that it can play Netflix videos, download Netflix Subtitle Downloader 0.13.21 from the first “mega” link here

            https://pastebin.com/rTxgCNQ1

            in the second “mega” link a video will teach you the new method of how to install Netflix Subtitle Downloader and using it for downloading the subtitles, to download the subtitles go to Kodi folder and rename it

            C:\Users\Essam\AppData\Roaming\Kodi\

            then open Kodi and install Netflix Subtitle Downloader 0.13.21, instead of “ar” use the code of your language (no need for installing input stream adaptive in this new method).

          6. Thank you so much, I have it working now!!

            One thing, my subtitles code doesn´t seem to be working, I have tried to download traditional chinese subtitles using this code “zh-Hant” and it doesn´t work. But if I just use the code zh, then it downloads both simplified and traditional (which is completely fine and awesome it is working now!) but just a bit confused why the full code doesnt work.

            Anyway, thank you for your help again

  1. Hey, it worked for me a few months ago and I tried installing this on my new computer and couldnt get it to work.

    In matts video it says click on InputStream Adaptive under my addon settings, and this option wasn´t there for me. Also I went into dependencies to have a look and it said everything was installed and working apart from script.module.pycryptodome

    Is anyone having similar issues or no how to fix?

    1. I forgot to say, I login fine and everything seems to work. I click on the episode I want and go to download the file and the loading icon comes up as if its doing something. Then when I check the folder the srt files should be in, nothing is there

  2. Just wanted to give an update: now that I got the new version of the plugin, I can finally download subs. I no longer encounter the bug I mentioned I a few days ago whereby sub files are all empty and weigh 0 byte. Everything’s peachy!

    Thanks again for all the work, Alan.

  3. Hello, Alan, thank you very much for your update, I’ve tried your latest version, but no srt files are produced automatically. However, I’m able to go to the manifest.json file to find download link of vtt files. Here is the error code, looking forward to your reply (my computer system is win10 with the lastest version of Kodi):

    16:38:44.341 T:11888 ERROR: EXCEPTION Thrown (PythonToCppException) : –>Python callback/script returned the following error<–
    – NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
    Error Type:
    Error Contents: ‘NoneType’ object has no attribute ‘content’
    Traceback (most recent call last):
    File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\service.py”, line 243, in
    NetflixService().run()
    File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\service.py”, line 101, in __init__
    self.nx_common)
    File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\NetflixHttpRequestHandler.py”, line 81, in __init__
    netflix_session=netflix_session)
    File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\NetflixHttpSubRessourceHandler.py”, line 31, in __init__
    self.prefetch_login()
    File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\NetflixHttpSubRessourceHandler.py”, line 48, in prefetch_login
    if self.netflix_session.login(account=self.credentials):
    File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\NetflixSession.py”, line 306, in login
    content=page.content)
    AttributeError: ‘NoneType’ object has no attribute ‘content’
    –>End of Python script error report<–

    1. Hmmm, not sure, but sounds like something is messing up during the login process. Looking back on your previous error logs, it sounds like you are constantly having different issues! I’m not really sure what could be going on with your system.

    1. Thank you, everything is working great now, and thank you for all the modifications you did in the plugin which makes using it so much easier.

    1. Hello Essam, I’ve tried this version, but it failed again. Here is the error code. Hope you could find out the problem. Thank you very much!

      00:45:55.408 T:11476 ERROR: Traceback (most recent call last):
      00:45:55.408 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 290, in _handle_request_noblock
      00:45:55.409 T:11476 ERROR: self.process_request(request, client_address)
      00:45:55.409 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 318, in process_request
      00:45:55.409 T:11476 ERROR: self.finish_request(request, client_address)
      00:45:55.409 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 331, in finish_request
      00:45:55.409 T:11476 ERROR: self.RequestHandlerClass(request, client_address, self)
      00:45:55.409 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 652, in __init__
      00:45:55.409 T:11476 ERROR: self.handle()
      00:45:55.409 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\BaseHTTPServer.py”, line 340, in handle
      00:45:55.409 T:11476 ERROR: self.handle_one_request()
      00:45:55.409 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\BaseHTTPServer.py”, line 328, in handle_one_request
      00:45:55.409 T:11476 ERROR: method()
      00:45:55.409 T:11476 ERROR: File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\MSLHttpRequestHandler.py”, line 69, in do_GET
      00:45:55.410 T:11476 ERROR: dolby, hevc, hdr, dolbyvision, vp9)
      00:45:55.410 T:11476 ERROR: File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\MSLv2.py”, line 235, in load_manifest
      00:45:55.410 T:11476 ERROR: return self.__tranform_to_dash(data)
      00:45:55.410 T:11476 ERROR: File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\MSLv2.py”, line 557, in __tranform_to_dash
      00:45:55.410 T:11476 ERROR: urllib.urlretrieve (base_url, os.path.join(subtitle_path, filename_out)) #download subtitle to a file
      00:45:55.410 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\urllib.py”, line 98, in urlretrieve
      00:45:55.438 T:11476 ERROR: return opener.retrieve(url, filename, reporthook, data)
      00:45:55.438 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\urllib.py”, line 245, in retrieve
      00:45:55.438 T:11476 ERROR: fp = self.open(url, data)
      00:45:55.438 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\urllib.py”, line 213, in open
      00:45:55.438 T:11476 ERROR: return getattr(self, name)(url)
      00:45:55.438 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\urllib.py”, line 443, in open_https
      00:45:55.438 T:11476 ERROR: h.endheaders(data)
      00:45:55.438 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\httplib.py”, line 1038, in endheaders
      00:45:55.439 T:11476 ERROR: self._send_output(message_body)
      00:45:55.439 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\httplib.py”, line 882, in _send_output
      00:45:55.439 T:11476 ERROR: self.send(msg)
      00:45:55.439 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\httplib.py”, line 844, in send
      00:45:55.439 T:11476 ERROR: self.connect()
      00:45:55.439 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\httplib.py”, line 1263, in connect
      00:45:55.439 T:11476 ERROR: server_hostname=server_hostname)
      00:45:55.439 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\ssl.py”, line 363, in wrap_socket
      00:45:55.444 T:11476 ERROR: _context=self)
      00:45:55.444 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\ssl.py”, line 611, in __init__
      00:45:55.444 T:11476 ERROR: self.do_handshake()
      00:45:55.444 T:11476 ERROR: File “E:\Program Files\Kodi\system\python\Lib\ssl.py”, line 840, in do_handshake
      00:45:55.444 T:11476 ERROR: self._sslobj.do_handshake()
      00:45:55.444 T:11476 ERROR: IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:661)

        1. Thank you for your detailed reply. I have followed most of your instruction; uninstall everything first. Try installing Kodi in C Drive; choose another folder to save the subtitles like, C:\sub. Unfortunately it doesn’t produce any results.

          But I have to use VPN and choose my language code (Chinese). Because in my region Netflix is restricted so I have to use VPN in order to use plugin, and the characters in the plugin can’t be displayed if I don’t change language code. Since I have used VPN and changed language code since I started using this plugin, so I don’t think VPN or language code could cause any problem.

          1. I meant the language code in “subtitles” then “only download subtitles with language code”, again, uninstall everything, and install the official plugin 0.13.20, and install inputstream.adaptive and try to play a video, if it did not work for you, make a debug file, and in this topic explain your problem and provide your operating system and your Kodi version, and the developers of the plugin will solve the problem for you.

            https://github.com/asciidisco/plugin.video.netflix/issues/555

            If the official plugin worked for you already, follow the steps here.

            http://www.nihongonobaka.com/download-japanese-subtitles-as-text-from-netflix-using-a-kodi-plugin/comment-page-2/#comment-10284

            You can ask me through private messages here to make easier to solve the problem.

            https://subscene.com/u/675629

          1. Install it by opening Kodi from the main menu press on “Add-ons” then stand on “My add-ons” then press on “Video player InputStream” , and press on “InputStream Adaptive” and press on “Install”.

            It may be better to ask me via private messages here, so i can help you faster.

            https://subscene.com/u/675629

        2. I have tried your manifest.json method, it also works for me, but still no srt files could be produced automatically. Here is the error code.
          [removed due to messing up the page formatting]

    1. Alright, I’m probably going to wait a bit before I update anything on my github. I want to see what ends up getting committed to the mainline plugin.

      1. This is a temp working release, if anyone needs the plugin urgently to download the subtitles in SRT format, everything works fine except the closed caption naming, i think it might be something like that.

        elif text_track[‘rawTrackType’] == ‘CLOSEDCAPTIONS’:

        this is without the {\an8} tag

        https://mega.nz/#!Vpl2zYBJ!1i7eVH8VGDqVrKt4j51LJvGHIRMFocmtvSiYjtfcqwM

        and this is with the {\an8} tag

        https://mega.nz/#!8tUyGa5D!aszm-zctTuUnjmI-sLGZkfalrKkFXGiHOleCOU9bKKQ

      1. This post is for Alan, you can use this release to download the subtitles but its not an easy way, uninstall Kodi fully uninstall, and install it and this version of the Netflix plugin

        https://mega.nz/#!Nksi1IoJ!7M7ITqVSTHVnAcfrrhTvHe_cxOwLJVkK-mnX1amwsRo

        Then go to the folder which is like this one in windows

        C:\Users\Essam\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.netflixsubs

        and open Kodi press on any movie title and you will get in this folder file with the name ‘manifest.json’, open it and in this file you will find subtitles links for the movie, one of them is the one in your language, download it and rename the file to .vtt, and close ‘manifest.json’.

        1. YES!!! It works! After opening the manifest.json file, simply search the target code of your language, copy the link and download the file, then rename the file. After the conversion you’ll get an srt file. Perfect!! Thanks a million, Essam.

  4. Hey ALAN, it seems that the fix is down again. I can not download any subtitles in any possible way. Hope you can confirm that soon and release a new fix.

    1. The plugin is down now on windows, but it might work for you on the android devices like Samsung a5 2017 phone running Android 8, and WeTek HUB.

  5. Hey ESSAM 🙂
    It WORKS!!!
    Thank you so much!!! You just made my month!!! Have a wonderful day! =] And I know this might be early, but Merry Xmas!!!

  6. Oh, BTW, its all 170ish episodes in one season. Is it possible kodi just wont show episodes more than 101 in just one season?

    Thanks again!

    1. To be able to download more than 170 episode, go to this directory

      C:\Users\Essam\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib

      open “NetflixSession.py” with “Notepad++”, and replace

      def fetch_episodes_by_season(self, season_id, list_from=-1, list_to=99):

      with

      def fetch_episodes_by_season(self, season_id, list_from=-1, list_to=200):

      and save the file

      or use this release

      https://mega.nz/#!kgsCCKwC!yjjVtEzFX0tOEqtWWR9SGtkPJwnUJyNOpAuH6zhkJIo

    2. This problem solved in the beta 0.14.0 and no need for modifying any files to see all the episodes (which will be released anytime soon)

      https://github.com/asciidisco/plugin.video.netflix/pull/519

      to prevent the plugin from asking for installing widevine and from playing the videos, in “player.py” in “plugin.video.netflix\resources\lib\navigation” you will need to replace

      if not is_helper.check_inputstream():
      raise InputstreamError(‘inputstream.adaptive is not available’)

      with

      #if not is_helper.check_inputstream():
      #raise InputstreamError(‘inputstream.adaptive is not available’)

      and in “profiles.py” in “plugin.video.netflix\resources\lib\services\msl” to use “webvtt-lssdh-ios8” you will need to replace “inputstream.adaptive” with “plugin.video.netflixsubs” and ‘2.3.8’ with ‘0.12.7’ in

      def _subtitle_profiles():
      isversion = xbmcaddon.Addon(‘inputstream.adaptive’).getAddonInfo(‘version’)
      return [‘webvtt-lssdh-ios8’
      if common.is_minimum_version(isversion, ‘2.3.8’)
      else ‘simplesdh’]

      and in ‘converter.py’ in ‘plugin.video.netflix\resources\lib\services\msl’ , where you will add the script but i think it will need to be rewritten to work correctly.

      1. Hey ESSAM 🙂
        It WORKS!!!
        Thank you so much!!! You just made my month!!! Have a wonderful day! =] And I know this might be early, but Merry Xmas!!!

  7. Hello, this method is awesome. But I come across one problem, im not sure if its kodi itself or what. Im trying to download all The Prince of Tennis anime ja subtitles, whenever I open your tool in kodi, it only shows the first 101 episodes of the anime, but the anime has more than 170 episodes in total on netflix, and all have japanese subtitles. Any idea how this could be fixed? Thanks alot and have a wonderful day!

  8. Thanks for the incredible work, Alan. Found out about it thanks to MattvsJapan.

    The plugin doesn’t seem to work properly at the moment. I downloaded the latest nightly build of Kodi + the latest version of the plugin (13.18), and set everything up, but when I download a Japanese subtitle from a show, it downloads an empty file, i.e. I do get a file with the proper name, but there is nothing inside it. Weighs 0 byte. No matter which show I try this with, I end up with an empty file.

    Any idea how to fix this? Thanks a ton!

    1. What operating system are you using? I haven’t come across this problem yet. If you are using the latest version of the plugin, could you also try the previous version, just in case I screwed something up on the most recent release?

      1. Thanks for the answer, Alan.

        I use Windows 10.

        I tried using NetflixSubs 13.17 as you suggested, to no avail. Now the subs just won’t download. I mean, the plugin will behave as if they did download, but when I open my folder, nothing appears.

        Could this be because I’m using a nightly build of Kodi?

        1. The Netflix plugin is down now in all of its releases on Windows 10 because Netflix changed something, if you have an android device try use the plugin with it in Kodi for the android, or try using ‘BlueStacks’ on windows with an android version of Kodi you can download it from here

          http://mirrors.kodi.tv/nightlies/android/

          but I’m not sure if the Netflix plugin will work or not.

          1. Just wanted to thank you for the replies, man.

            I guess I’ll patiently wait for a new update then. Can’t wait!

  9. Actually….I kind of like the image version of the Japanese sub displaying in the web version….(the characters’ layout looks really good, especially the kana on the kanji, very convenient for language learner)

    But it seems that there’s nothing that is able to perfectly convert the PNG+XML pack to PGS format….(mainly because of the displaying position issue)
    I wonder if the text sub could be displayed in the way that NF’s web version does🤔

  10. OK…..I installed it finally…..

    idk if Zarxrax(the author of the add-on) is here….but i hope that this add-on could download the forced subtitles as well in the next version 🙂

    1. Curious what you want the forced subtitles for? They are usually included as part of another subtitle stream.
      I might be able to also allow downloading of them, though.

        1. I just posted a new version of the plugin that includes a setting to download forced subtitles. The filename will also now indicate if it is a forced subtitle or a closed caption.

  11. Hello !
    Is there a step by step explanation for old people like me ? I just want to download some Netflix subs in srt format but I’m totally lost when I read “file_content = re.sub(r'{.*?}’, ”, file_content) filename_out in_file.replace(“.vtt”,”.srt”)”
    or similar.

    1. Just follow the instructions at the top of this article, you just need to install kodi and the Netflixsubs plugin. There is no need to look at any code.

  12. I met the same problem with Jessica C. I have been using this plugin downloading Chinese subtitles successfully for the past month. Yesterday afternoon it suddenly failed to work. I have already reinstalled the latest version of KODI app as well the plugin. I will put my log here so you can analyse the problem.

    23:47:33.100 T:368 WARNING: CPythonInvoker(3, C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py): the python script “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py” has left several classes in memory that we couldn’t clean up. The classes include: class XBMCAddon::xbmcaddon::Addon
    23:48:26.328 T:17132 ERROR: Control 55 in window 10025 has been asked to focus, but it can’t
    23:48:28.889 T:4448 WARNING: CPythonInvoker(4, C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py): the python script “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py” has left several classes in memory that we couldn’t clean up. The classes include: class XBMCAddon::xbmcaddon::Addon
    23:48:38.133 T:10292 WARNING: CPythonInvoker(5, C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py): the python script “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py” has left several classes in memory that we couldn’t clean up. The classes include: class XBMCAddon::xbmcaddon::Addon
    23:48:42.357 T:14300 WARNING: CPythonInvoker(6, C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py): the python script “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\addon.py” has left several classes in memory that we couldn’t clean up. The classes include: class XBMCAddon::xbmcaddon::Addon

    23:48:52.715 T:13004 ERROR: Traceback (most recent call last):
    23:48:52.715 T:13004 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 290, in _handle_request_noblock
    23:48:52.715 T:13004 ERROR: self.process_request(request, client_address)
    23:48:52.715 T:13004 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 318, in process_request
    23:48:52.715 T:13004 ERROR: self.finish_request(request, client_address)
    23:48:52.715 T:13004 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 331, in finish_request
    23:48:52.715 T:13004 ERROR: self.RequestHandlerClass(request, client_address, self)
    23:48:52.715 T:13004 ERROR: File “E:\Program Files\Kodi\system\python\Lib\SocketServer.py”, line 652, in __init__
    23:48:52.715 T:13004 ERROR: self.handle()
    23:48:52.715 T:13004 ERROR: File “E:\Program Files\Kodi\system\python\Lib\BaseHTTPServer.py”, line 340, in handle
    23:48:52.716 T:13004 ERROR: self.handle_one_request()
    23:48:52.716 T:13004 ERROR: File “E:\Program Files\Kodi\system\python\Lib\BaseHTTPServer.py”, line 328, in handle_one_request
    23:48:52.716 T:13004 ERROR: method()
    23:48:52.716 T:13004 ERROR: File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\MSLHttpRequestHandler.py”, line 67, in do_GET
    23:48:52.716 T:13004 ERROR: dolby, hevc, hdr, dolbyvision)
    23:48:52.716 T:13004 ERROR: File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\MSL.py”, line 216, in load_manifest
    23:48:52.716 T:13004 ERROR: return self.__tranform_to_dash(data)
    23:48:52.717 T:13004 ERROR: File “C:\Users\william2568\AppData\Roaming\Kodi\addons\plugin.video.netflixsubs\resources\lib\MSL.py”, line 302, in __tranform_to_dash
    23:48:52.717 T:13004 ERROR: manifest = manifest[‘result’][‘viewables’][0]
    23:48:52.717 T:13004 ERROR: KeyError: ‘viewables’
    23:48:52.717 T:17320 ERROR: CCurlFile::FillBuffer – Failed: Server returned nothing (no headers, no data)(52)
    23:48:52.717 T:17320 ERROR: CCurlFile::Open failed with code 0 for http://localhost:10764/manifest?id=81030893&dolby=true&hevc=false&hdr=false&dolbyvision=false:
    23:48:52.717 T:17320 ERROR: XFILE::CFileCache::Open – failed to open source
    23:48:52.717 T:17320 ERROR: CVideoPlayer::OpenInputStream – error opening

    1. It worked perfectly fine in the past two months downloading Chinese subtitles. But i haven’t been able to download any subtitles since this afternoon, although i’ve reinstalled the KODI app and the Netflix subtitle downloader plugin. The original Netflix plugin also seems not functional. I wonder whether Netflix is to blame for this issue or any other reasons. Hope someone can fix this soon. BTW. I’m using a Mac and my VPN works fine.

          1. The official release 0.13.17 is out

            https://github.com/asciidisco/plugin.video.netflix/archive/0.13.17.zip

            But be aware that inputstream.adaptive-2.3.8 or newer releases must by installed and enabled for ‘webvtt-lssdh-ios8’ to work and to download the subtitles in SRT format, the addon in version 0.13.16 had been modified to show the subtitles of the image based languages like Japanese, Hebrew, Greek and Arabic in text format when you play the videos, thanks to “peak3d” the developer of inputstream.adaptive on my request for supporting them

            https://github.com/peak3d/inputstream.adaptive/commit/fb2d4aca60b349a047dfc6620adb920643cce043

            and here

            https://github.com/asciidisco/plugin.video.netflix/commit/58c85cf21fb8f1e2d1ec5738e6036643a22c3e01

            you can use this workaround, just replace ‘inputstream.adaptive’ here

            # subtitles
            addon = xbmcaddon.Addon(‘inputstream.adaptive’)
            if addon and addon.getAddonInfo(‘version’) >= ‘2.3.8’:
            manifest_request_data[‘profiles’].append(‘webvtt-lssdh-ios8’)
            else:
            manifest_request_data[‘profiles’].append(‘simplesdh’)

            with ‘plugin.video.netflixsubs’

            and replace ‘2.3.8’ with ‘0.12.7’, so no need to install ‘inputstream.adaptive’ and enabling it.

          2. Thank you, everything is working fine on my windows 10 32bit. You still need to keep eyes for newer releases they might find new bugs.

            By the way i figured out before in MSL.py replacing

            downloadable = text_track[‘downloadables’][0]

            with

            downloadable = text_track[‘downloadables’][0]
            if text_track[‘isForced’]:
            continue

            will prevent the forced subtitles from being downloaded.

          3. Can you explain what reasons you might want to disable the forced subtitles? I’m trying to understand what situation this is useful for.

          4. First i was trying to prevent the forced subtitles from being downloaded here but failed to understand how to do it (the forced subtitles are very small part of the full subtitles used to translate the words that are hard-codded on the video)

            http://www.nihongonobaka.com/download-japanese-subtitles-as-text-from-netflix-using-a-kodi-plugin/comment-page-2/#comment-9203

            Then i was trying to prevent the forced subtitles from showing at the subtitles menu when using the Netflix plugin to play the videos with Arabic subtitles.

            The benefit of preventing the forced subtitles from being showing in ‘Subtitle_urls.txt’ and from being downloaded is no more worries that they might overwrite the full subtitles, and no need for using

            else: #if already exists
            urllib.urlretrieve (base_url, os.path.join(subtitle_path, ‘temp’)) #download subtitle to a file
            if (os.path.getsize(os.path.join(subtitle_path, ‘temp’)) > os.path.getsize(os.path.join(subtitle_path, filename_out))): #if new one is bigger than the old one
            os.remove(os.path.join(subtitle_path, filename_out))
            os.rename(os.path.join(subtitle_path, ‘temp’), os.path.join(subtitle_path, filename_out))
            else:
            os.remove(os.path.join(subtitle_path, ‘temp’))

            In another matter, i have found that Netflix sometimes uses the language code and the country abbreviations with it something like

            ar-EG
            (EG for Egypt)

            and when i write in the language code “ar”, the file with ar-EG in it is not downloaded, and to download it i must leave the language code empty.

            Here are the subtitle file, manifest.json and manifest.mpd they might helping you to understand the problem

            https://mega.nz/#!dpMAXA6Z!Yp3YbEZQa2juqfMuoLpcMD3sTmc52zUd9oL7TWcI7yo

            http://www.lingoes.net/en/translator/langcode.htm

            can you please modify this part so when i write in the language code “ar” the files with ar-EG be downloaded too (and for the languages that using the countries abbreviations)

            filename_lang = str(text_track.get(‘bcp47’))
            file.write(filename_lang) #write subtitle language and url to file
            file.write(‘: ‘ + base_url + ‘\r\n’) #write subtitle language and url to file
            if (filename_lang == self.nx_common.get_setting(‘subtitle_language’).lower()) or (self.nx_common.get_setting(‘subtitle_language’) == ”):

          5. Here is an example, full subtitles for the movie Bright

            https://mega.nz/#!xgkCkK4b!K9dx1jrhP4gGng0KV_U9A9xvo254XjTBMZFBp7pDdXU

            Forced subtitle for the movie Bright

            https://mega.nz/#!Fo8WnCoQ!spnzquv6cBJReLQHqyCYYwOuvpRnsLti4j9YTGw16yY

            But now i think, since the forced subtitles always come later in Subtitle_urls.txt,

            if not os.path.isfile(os.path.join(subtitle_path, filename_out)):
            urllib.urlretrieve (base_url, os.path.join(subtitle_path, filename_out)) #download subtitle to a

            will be enough for preventing them from being downloaded, here Subtitle_urls.txt with full and forced subtitles in it.

            https://mega.nz/#!owtCTS5K!9Ao2LuPdN-b83OJPHcO66WC8ZZ-iFjnuatlPQx3PWXg

          6. I have added a new commit on my github project that I think should do what you are asking. It will skip the forced subtitles. And if you use ‘ar’ language, it should download every subtitle whose language code starts with ‘ar’.

          7. Just a small observation, the CC subtitles always come later and its always bigger in size than the normal subtitles, you might like to leave this part intact, which will prevent the CC subtitles from overwriting the normal subtitles

            if not os.path.isfile(os.path.join(subtitle_path, filename_out)): #if file doesnt exist already
            urllib.urlretrieve (base_url, os.path.join(subtitle_path, filename_out)) #download subtitle to a file

            Here is an example, episode 1 from the TV series “Elite”

            https://mega.nz/#!w1EmCYLR!KDgbOappqtsBjDd3X1A1XG6vctrNWUwLtCw1pM7RvjI

  13. Is it possible to modify this part of the code, so not to download the subtitles if “isForced”: True

    subtitle_path = self.nx_common.get_setting(‘subtitle_folder’)
    file = codecs.open(os.path.join(subtitle_path, ‘Subtitle_urls.txt’), ‘w’, encoding=’utf-8′)
    for text_track in manifest.get(‘textTracks’):
    is_downloadables = ‘downloadables’ not in text_track
    if is_downloadables or text_track.get(‘downloadables’) is None:
    continue
    subtiles_adaption_set = ET.SubElement(
    parent=period,
    tag=’AdaptationSet’,
    lang=text_track.get(‘bcp47′),
    codecs=’stpp’,
    contentType=’text’,
    mimeType=’application/ttml+xml’)
    for downloadable in text_track[‘downloadables’]:
    rep = ET.SubElement(
    parent=subtiles_adaption_set,
    tag=’Representation’,
    nflxProfile=downloadable.get(‘contentProfile’))
    base_url = self.__get_base_url(downloadable[‘urls’])
    ET.SubElement(rep, ‘BaseURL’).text = base_url
    filename_lang = str(text_track.get(‘bcp47’))

    I can delete the subtitles in vtt format with this code

    dir_name = (subtitle_path)
    test = os.listdir(dir_name)

    for item in test:
    if item.endswith(“.vtt”):
    os.remove(os.path.join(dir_name, item))

    but this makes this part useless

    if not os.path.isfile(os.path.join(subtitle_path, filename_out)):
    urllib.urlretrieve (base_url, os.path.join(subtitle_path, filename_out)) #download subtitle to a file
    # xbmc.log(“Downloaded Subtitle ” + filename_out,2)
    else:
    urllib.urlretrieve (base_url, os.path.join(subtitle_path, ‘temp’)) #download subtitle to a file
    if (os.path.getsize(os.path.join(subtitle_path, ‘temp’)) > os.path.getsize(os.path.join(subtitle_path, filename_out))):
    os.remove(os.path.join(subtitle_path, filename_out))
    os.rename(os.path.join(subtitle_path, ‘temp’), os.path.join(subtitle_path, filename_out))

    and make the forced subtitles in SRT format overwrite the full subtitle. I noticed that the forced subtitles always comes later.

    1. I mean “isForced”: true in manifest.json, or if possible to modify this part of the code so not to convert the vtt files to srt if there is already srt file with the same name:

      def __convert2SRT(self, in_file):
      subtitle_path = self.nx_common.get_setting(‘subtitle_folder’)
      f = codecs.open(os.path.join(subtitle_path, in_file), ‘r’, encoding=’utf-8′)
      file_content = f.read()
      f.close()
      #xbmc.log(“Successfully read file”,2)
      file_content = re.sub(r'([\d]+)\.([\d]+)’, r’\1,\2′, file_content)
      file_content = re.sub(r’WEBVTT\n\n’, ”, file_content)
      file_content = re.sub(r’NOTE.*\n’, ”, file_content)
      file_content = re.sub(r’\n\s+\n’, ”, file_content)
      file_content = re.sub(r’ position:.+%’, ”, file_content)
      file_content = re.sub(r”, ”, file_content)
      file_content = re.sub(r'{.*?}’, ”, file_content)
      filename_out = in_file.replace(“.vtt”,”.srt”)
      f = codecs.open(os.path.join(subtitle_path, filename_out), “w”, encoding=”utf-8″)
      f.write(file_content)
      f.close()

    2. I have tried modifying the code so its not neccessary to keep the vtt files, but I haven’t really tested it yet. I’ll try looking over what you’ve got here next time I mess with it.

  14. Do you can keep <i></i>
    dont ignore this code? Because some text is Italic.

    AND

    convert => line:10.00% to {\an8}
    Because some text is display on top.

    1. Try this release, it will keep and will generate {\an8} in the SRT file but only if
      position:50.00 and line:10.00, which is the only values used in most of the languages for {\an8} except English which uses many values for {\an8} other than position:50.00 and line:10.00 like:
      position:36.67%,start align:start size:36.67% line:15.33%
      position:44.29%,start align:start size:30.95% line:20.66%
      position:44.29%,start align:start size:25.24% line:15.33%
      any many more
      you can find them in the first episode in the first season from Vikings in the English subtitle in vtt format.

      https://mega.nz/#!Q0kjTAhL!DxZhPhXJveF9y6JciyGqVFtSYDVKr-sbOODCHgZFP3Y

    2. The SRT format doesn’t support any formatting such as positioning, so I don’t want to put that into SRT files. It is questionable as to whether it should support italics or bold text, but I think generally, basic srt doesn’t really support it.
      To preserve formatting as much as possible, it is better to not convert to srt, but keep the original VTT file, and then convert to an appropriate format using another tool.

Leave a Reply

Your email address will not be published. Required fields are marked *