Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_youtube_streams(url):
"""Get both audio & video stream urls for youtube using youtube-dl.
PS: I don't know how youtube-dl does the magic
"""
cli = "youtube-dl -g {}".format(url)
output, error = utility.exe(cli)
stream_urls = output.split("\n")
url = stream_urls[1]
return url
def get_youtube_streams(url):
"""Get both audio & video stream urls for youtube using youtube-dl.
PS: I don't know how youtube-dl does the magic
"""
cli = "youtube-dl -g {}".format(url)
output, error = utility.exe(cli)
stream_urls = output.split("\n")
url = stream_urls[1]
return url