Skip to content

Instantly share code, notes, and snippets.

@WilCF
WilCF / kexp.py
Created August 21, 2023 19:31 — forked from dramamine/kexp.py
KEXP show scraper
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
@WilCF
WilCF / download_as_video.py
Last active March 8, 2023 16:06 — forked from yogeshsinghgit/download_as_video.py
Download YouTube Videos in Mp4 Format using Python Pytube module
# 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]}")