This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
from datetime import datetime, timedelta | |
destination_path = "shows" | |
# ids from https://api.kexp.org/v2/shows/ | |
programs = [ | |
3, # expansions | |
5, # midnight in a perfect world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gets highest resolution and prompts user for yt link, otherwise identical to yogeshsinghgit's https://gist.github.com/yogeshsinghgit/14241e51d3d4d67571ef999647fb7c67 | |
from pytube import YouTube | |
def download_video(yt): | |
# get highest resolution mp4 stream | |
stream = yt.streams.get_highest_resolution() | |
# print resolution and codec format of highest resolution mp4 stream | |
print(f"Video Resolution : {stream.resolution} VCodec : {stream.codecs[0]}") |