Objective: Do a version of the “Build 14 Websites…” weather scraper challenge with the following improvements:
Scraper PHP:
– Add error detection and reporting
– Return city code
– Improve robustness of 1-3 day weather scrape (not dependent on exact sequence of <span>s).
– Support converting forecast from metric degrees C and mm to degrees F and inches.
Bootstrap Weather page:
– Add test cases to exercise error reporting (see city names Test0 through Test4).
– Update city with city code from scraper if available
Source Code:
https://github.com/bseaver/Demonstration-Projects.git
City Weather Demonstration Web page:
http://seaver99.com/demo/php/wxcitypage.php
The intention of this example is to show anticipation of potential problems in data processing and and the code required to report or resolve those problems. It also adds a few small features for completeness such test cases and a check box to convert Centigrade to Fahrenheit.
