add yt 4k format
This commit is contained in:
parent
2456ec2d5a
commit
5179a4fcf9
1 changed files with 5 additions and 3 deletions
|
@ -10,7 +10,7 @@ import feedparser
|
|||
import ox
|
||||
from ox.cache import read_url, cache_timeout
|
||||
|
||||
|
||||
|
||||
def video_url(youtubeId, format='mp4', timeout=cache_timeout):
|
||||
"""
|
||||
youtubeId - if of video
|
||||
|
@ -19,9 +19,11 @@ def video_url(youtubeId, format='mp4', timeout=cache_timeout):
|
|||
def get_url(stream):
|
||||
return '%s&signature=%s' % (stream['url'], stream['sig'])
|
||||
fmt = None
|
||||
if format == '1080p':
|
||||
if format == '4k':
|
||||
fmt=38
|
||||
elif format == '1080p':
|
||||
fmt=37
|
||||
if format == '720p':
|
||||
elif format == '720p':
|
||||
fmt=22
|
||||
elif format == 'mp4':
|
||||
fmt=18
|
||||
|
|
Loading…
Reference in a new issue