all repos — FixYouTube-legacy @ d7855fbe2c2ad5d51358e6e79b985f2b27989e7f

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