Import from tsudoko/nicovideo-dl