Translating comments on Nico Nico Douga (ニコニコ動画).
You can install it using pip:
$ pip install niconico-translator
Aliasing msg.nicovideo.jp to localhost
To make the translator to intercept comments from Nico Nico comment server, you have to alias Nico Nico comment server domain (msg.nicovideo.jp) to your localhost (127.0.0.1). Open your hosts file using text editor (you probably need administrator permission), and then add the following line:
The translator behaves as a proxy server, so it has to be running while you watch Nico Nico videos. You can invoke the proxy server using CLI (you probably need administrator permission to listen 80 port):
You can terminate the server by pressing Ctrl-C.
It can optionally take the target language which is a two-letter e.g. en, ko:
$ niconico-translator --language ko
If you have a WSGI fetish, you can utilize it as a WSGI application. It’s actually an ordinary WSGI application, you can serve it using your favorite WSGI server e.g. Gunicorn:
$ gunicorn "niconico_translator:App('en')"
Every instance of niconico_translator.App implements __call__() method, which is a WSGI application.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|niconico_translator-0.1.4-py3-none-any.whl (7.1 kB) Copy SHA256 hash SHA256||Wheel||3.2||May 4, 2014|
|niconico-translator-0.1.4.tar.gz (4.6 kB) Copy SHA256 hash SHA256||Source||None||May 4, 2014|