all repos — FixYouTube-legacy @ 22eca08269087fac9db84faaf39ddc1d32f09e4e

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="
7TS_FORMAT = "%Y-%m-%d %H:%M:%S"
8MAX_SIZE_BYTES = MAX_SIZE_MB * 1_000_000