|
|
|
@ -5,14 +5,25 @@ import "strings"
|
|
|
|
// IsSocialMediaBot checks if the User-Agent belongs to a social media crawler.
|
|
|
|
// IsSocialMediaBot checks if the User-Agent belongs to a social media crawler.
|
|
|
|
func IsSocialMediaBot(ua string) bool {
|
|
|
|
func IsSocialMediaBot(ua string) bool {
|
|
|
|
bots := []string{
|
|
|
|
bots := []string{
|
|
|
|
|
|
|
|
// Meta (Facebook, Instagram, WhatsApp)
|
|
|
|
"facebookexternalhit",
|
|
|
|
"facebookexternalhit",
|
|
|
|
|
|
|
|
"facebookcatalog",
|
|
|
|
|
|
|
|
"facebot",
|
|
|
|
|
|
|
|
"meta-externalagent",
|
|
|
|
|
|
|
|
// Twitter/X
|
|
|
|
"twitterbot",
|
|
|
|
"twitterbot",
|
|
|
|
|
|
|
|
// LinkedIn
|
|
|
|
"linkedinbot",
|
|
|
|
"linkedinbot",
|
|
|
|
"whatsapp",
|
|
|
|
// Discord
|
|
|
|
"slackbot",
|
|
|
|
|
|
|
|
"discordbot",
|
|
|
|
"discordbot",
|
|
|
|
|
|
|
|
// Telegram
|
|
|
|
"telegrambot",
|
|
|
|
"telegrambot",
|
|
|
|
"facebot",
|
|
|
|
// Slack
|
|
|
|
|
|
|
|
"slackbot",
|
|
|
|
|
|
|
|
// WhatsApp
|
|
|
|
|
|
|
|
"whatsapp",
|
|
|
|
|
|
|
|
// Pinterest
|
|
|
|
|
|
|
|
"pinterestbot",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ua = strings.ToLower(ua)
|
|
|
|
ua = strings.ToLower(ua)
|
|
|
|
for _, bot := range bots {
|
|
|
|
for _, bot := range bots {
|
|
|
|
|