Update crawler.py to fix UnboundLocalError

Fixes: "UnboundLocalError: local variable 'state_id' referenced before assignment" in run_crawler().