Skip to main content

Library for detecting if a HTTP User Agent header is likely to be a bot

Project description

# robot_detection

robot_detection is a python module to detect if a given HTTP User Agent is a web crawler. It uses the list of registered robots from (Robots Database)[

## Usage

There is only one, function, is_robot that takes a string (unicode or not) and returns True iff that string matches a known robot in the robot database

### Example

>>> import robot_detection
>>> robot_detection.is_robot(user_agent_string)

## Updating

You can download a new version of the Robot Database from (this link)[].

Download the database dump, and run the file with the file as first argument.

$ wget $ python all.txt

If the database has changed, it’ll print out the new version of robot_useragents variable that you need to put into the source code.

## Tests

Some simple unittests are included. Running the file will run the tests.

Project details

Release history Release notifications

History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
robot-detection-0.2.8.tar.gz (77.3 kB) Copy SHA256 hash SHA256 Source None Apr 11, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page