Code for a simple BS crawler