The Python script will help you to get the live Nifty50 details in the CSV format.
git clone https://github.com/felsen/nifty50-csv.git
cd nifty50-csv
pip install -r requirements.txt
python nifty_50_csv.py
Just run the python file in terminal it will generate the live Nifty 50 details in the CSV format.