Closed lschmid83 closed 3 months ago
The https://www.aa.org/daily-reflections page had been redesigned to only display the Jan 1st reading on page load then make an AJAX call to retrieve the reading of the day. After inspecting the web page in Chrome developers tools I found they have an API method https://www.aa.org/api/reflections/06/05 which accepts the month and day for the reading. This returns a JSON object with a data string that contains the HTML. I request this using the Volley library and parse it into a JSoup HTML document object. The actual HTML structure had not changed so I was able to reuse the existing code to parse the document for the required elements.
I have already implemented the code to retrieve the daily reflection from the https://www.aa.org/daily-reflections website. For some reason currently it only displays the reading stuck on Jan 1st. It was working fine previously it appears they have redesigned the website. The code needs to be fixed and can be found under ui/home/thought_for_the_day/DailyReflectionFragment.java