问题
is there a way to reliably identify a facebook bot by IP?
My site is getting hammered by bots claiming to be facebook, but how do I know for sure? I'm looking for some kind of official procedure to validate a facebook bot similar to what Google recommends for their bots here.
Can I perhaps parse OrgName
in whois
and trust that? Or can that be fake?
回答1:
I'm answering this for the sake of keyword indexing in the internets.
Indeed, it looks like the best way to identify a Facebook bot (Facebook Scraper) is by matching IP to the range of declared official Facebook IP ranges that can be acquired by running
whois -h whois.radb.net '!gAS32934'
回答2:
Why don't you just check the user-agent
, such as
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
instead of IP
?
来源:https://stackoverflow.com/questions/11881609/how-to-identify-a-facebook-bot