Learning to write crawler