How to Solve NameError: name 'youtube_dl' is not defined

Solution: Import the 'youtube_dl' module

To Solve the error, add the following line to the top of your code.

import youtube_dl

 

For more information:
Python youtube_dl