This is a Python Program to get all the captions from youtube link: and the output of the above program is: But I want to get only the lang and code from the above output in a dictionary pair. Thanks in Advance. Answer It’s pretty simple If you want a one-liner Output