Force Applebot to be seen as a scraping bot. Closes #134

This commit is contained in:
Gabe Kangas 2020-08-31 20:36:52 -07:00
parent 99521e6741
commit c741797472
2 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ func IsUserAgentABot(userAgent string) bool {
botStrings := []string{
"mastodon",
"pleroma",
"applebot",
}
for _, botString := range botStrings {

View File

@ -6,6 +6,7 @@ func TestUserAgent(t *testing.T) {
testAgents := []string{
"Pleroma 1.0.0-1168-ge18c7866-pleroma-dot-site; https://pleroma.site info@pleroma.site",
"Mastodon 1.2.3 Bot",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)",
}
for _, agent := range testAgents {