Scripts for extracting data from nfo

I wanted to share the scripts I wrote recently to extract data from movie and tvshow nfos. If you are a fan of spreadsheets, these scripts extract data from your collection to a text file which you can import into a good ol spreadsheet. You need python3 for executing the script.

For tvshow.nfo

Code:
https://gist.github.com/akyag/ca3649386550d30f81165745fbde9713

and for movie.nfo

Code:
https://gist.github.com/akyag/1205819121757d3eb7ffda062f707bc8

You need to edit the path to your collection. You get output like this for example –
title_rating_premiered_status_studio_genre_tags

Code:
8 Simple Rules_8.5_2002-09-14_Ended_ABC (US)_Comedy_
Arrested Development_9.3_2003-11-02_Ended_Netflix_Comedy_
Banshee_8.8_2013-01-11_Ended_Cinemax_Action, Adventure, Crime, Drama_MZABI, BluRay, x265, 720p
Battlestar Galactica_9.3_2003-12-08_Ended_SciFi_Action, Adventure, Drama, Science Fiction_
Breaking Bad_9.3_2008-01-17_Ended_AMC_Crime, Drama, Suspense, Thriller_Sparrow, BluRay, 720p

title_rating_year_runtime_genre_codec_tags

Code:
Once Upon a Time in the West_7.9_1968_166_Action, Western_Sergio Leone_h264 / AAC_YIFY
The Secret in Their Eyes_7.8_2009_129_Crime, Drama, Mystery, Romance_Juan José Campanella_h264 / AAC_anoXmous
The Silence of the Lambs_7.9_1991_118_Crime, Drama, Thriller_Jonathan Demme_h264 / AAC_YIFY
The Truman Show_7.7_1998_106_Comedy, Drama_Peter Weir_h264 / AAC_YIFY
The Usual Suspects_8.0_1995_106_Drama, Crime, Thriller_Bryan Singer_h264 / AAC_YIFY
WALL·E_7.7_2008_98_Animation, Family_Andrew Stanton_h264 / AAC_KiNGDOM - BRRip

The script took about 14 sec to extract data from 680 movies.