I already have a map-scraping script that pulls building names and footprints, but I’m running into two consistent problems: the tool crashes after several hundred requests and, when it does run, performance slows to a crawl on larger areas. I’d like you to dig into the codebase, resolve those stability and speed issues, and then extend the scraper so it can target any location worldwide—not just the handful of hard-coded cities it currently supports. Once the refactor is complete the scraper must: • Extract the name and size of every factory in the selected area (other building types are optional, but factories are mandatory for this phase). • Export the full result set as a well-formed XML file that matches the existing schema I’ll provide. Acceptance is simple: run the tool against two test coordinates I’ll supply—one urban, one rural—without a crash, with responsive performance, and with clean XML output that validates against the schema. I’ll handle deployment after code hand-off; just make sure the project is easy to set up (requirements.txt or similar) and your changes are clearly commented.