Answer the question
In order to leave comments, you need to log in
What User-Agent does the VKontakte bot have?
Actually I have two questions.
1. How to distinguish the VKontakte bot (which parses the page when you click on "Share" / "Like" on this page)?
2. Is there some common property that unites all search bots (User-Agents can be radically different, I would like something else)?
Let me explain where the question came from. We use it for authorization on the CAS (Central Authorization Service) website, which makes life difficult for bots - for any request, we automatically send the user with a 302 redirect to the authorization server, checking if this user is already authorized. This greatly prevents search bots (and facebook, vk bots) from parsing the page. I would like to create special conditions for them.
Answer the question
In order to leave comments, you need to log in
By user agent will not work.
Vkontakte uses a string typical for a browser.
You have a crooked authorization system - you need to fix it, and not distinguish between bots. For example, as a quick solution, instead of a forced redirect, you can show an authorization form in an iframe.
There was such a problem. As a result, they simply rewrote the authentication system so that there was no redirect. Usually, if the framework is relatively straight forward, it's not that hard to do.
To be honest, I don’t know the details of CAS itself, but you can always, for example, make JS-binding and redirect through scripts. Trying to recognize all robots is a thankless task. Then you will have to maintain this list again ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question