Python code to extract web data and convert it to a JS object for utilizing it in dynamic layout generation