Use Jenkins API instead of HTML scraping.