all repos — FixYouTube-legacy @ 476e2ef39e5caac3491a4e3f9c4a7d3635d217f4

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

fxyoutube/constants.py (view raw)

1MAX_SIZE_MB = 50
2DB_URL = "cache.db"
3UA_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"
4BASE_URL = "https://www.youtube.com/watch?v="
5TS_FORMAT = "%Y-%m-%d %H:%M:%S"
6MAX_SIZE_BYTES = MAX_SIZE_MB * 1_000_000