crawler.py refactored