PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to stream m3u8 url to youtube in python

from urllib2 import urlopen from livestreamer import Livestreamer from livestreamer.stream import StreamError url = 'http://fmsb.mediacdn.vn/live/fptbongda1_500.m3u8' livestreamer = Livestreamer() streams = livestreamer.streams(url) try: stream = streams["best"] print stream.url except StreamError, err: print "Unable to find stream: {0}".format(err)

Questions about programming?Chat with your personal AI assistant