a simple crawler to download webpages and organise the resources