Invoke it with ie: ./scraper http://www.dilbert.com '//div[@class='\''STR_Image'\'']/a/img/@src'
See http://w3c.github.io/tidy-html5/ and https://github.com/w3c/tidy-html5.