I want to create a crawler with C#. The problem is that some websites have disabled black listed crawlers in their robots.txt file, using:
User-agent: *
Disallow: /
Is there a way I could fake my request to show that I’m for instance Googlebot?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HttpWebRequesthas.UserAgent, however – I would simply say: don’t.Of course, your point re robots.txt is rather moot; that is for you to follow. If you write a badly behaved tool that ignores
robots.txtregardless of what you claim as your user-agent, then you should expect to be blacklisted fairly quickly.In particular, trying to impersonate any of the major players is very dubious. Frankly I’d expect most major sites to also check the incoming IP range.