Back in June of 2017 I posted an article describing how to retrieve quotes from the Yahoo Finance page.
The other day I received a message from a user who found that the program no longer worked. After looking into the issue I found that Yahoo responds differently depending on the User-Agent setting being presented to the server. The quick fix was to change the value submitted.
request.addHeader("User-Agent", "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:188.8.131.52) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13");
request.addHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:74.0) Gecko/20100101 Firefox/74.0")