all repos — FixYouTube-legacy @ e21d9119ec75e0c9ad9823a32488807d4dd5159b

A better way to embed YouTube videos everywhere (inspired by FixTweet).

fxyoutube/constants.py (view raw)

 1MAX_SIZE_MB = 50
 2YT_TTL_MINUTES = 60 * 6
 3DB_URL = "cache.db"
 4
 5UA_REGEX = r"bot|facebook|embed|got|firefox\/92|firefox\/38|curl|wget|go-http|yahoo|generator|whatsapp|preview|link|proxy|vkshare|images|analyzer|index|crawl|spider|python|cfnetwork|node"
 6BASE_URL = "https://www.youtube.com/watch?v="
 7REPO_URL = "https://github.com/BiRabittoh/FixYouTube"
 8TS_FORMAT = "%Y-%m-%d %H:%M:%S"
 9PROXY_HEADERS = { "Content-Type": "video/mp4" }
10YTDL_OPTS = { "format": f"best[ext=mp4][filesize<{ MAX_SIZE_MB }M][protocol^=http][protocol!*=dash]" }