Copied mostly from wagga scraper