HTML/Javascript Obfuscation -- How To Read Data?

Hello, everyone. I've got a non-KM question in case anyone can help me. Basically I use a website called Stockcharts.com and for the longest time have use Javascript to grab both the source code and "inner text" of a page, so I could extract data on what I was looking at. The company rolled out a new platform that does some kind of javascript obfuscation, to the point that the HTML I can view is 100% useless to getting any information. I can't even get just the ticker symbol I'm looking at, if it's not in the URL.

So my question is, is there any trick to accessing the actual data I'm looking at in my browser (Chrome)? Viewing strings that are displaying on screen, or at least the contents? What would be a good way to approach this?

Some of the code is below, I can provide the whole file if needed.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- META DESCRIPTION -->
        <meta name="description" content="Welcome to the dashboard for your StockCharts account">
        <!-- KEYWORDS -->
        <meta name="keywords" content="technical analysis, charts, financial charts, sharpcharts, point and figure, yield curve, seasonality, rrg, relative rotation graph, investing, stocks, etfs" />
        <!-- CONTENT SECURITY POLICY -->
        

        <!-- FAVICON -->
        <link rel="shortcut icon" href="/favicon.gif" type="image/gif" />
        <!-- TITLE TAG -->
        <title>Your Dashboard | StockCharts.com</title>

        <!-- SITEWIDE FONTS -->
        <link href="//d.stockcharts.com/css/google-fonts.css" rel="stylesheet" type="text/css" />
        <!-- FONT AWESOME -->
        <link href="//d.stockcharts.com/font-awesome/css/all.css" rel="stylesheet" type="text/css" media="all" />
        <!-- SCC ICONS -->
        <link href="//d.stockcharts.com/css/lib/scc-icons-square.css" rel="stylesheet" type="text/css" />
        <!-- BOOTSTRAP -->
        <link href="//d.stockcharts.com/vendor/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet" />
        <!-- CSS (SHARED) -->
        <link href="//d.stockcharts.com/css/favorites.css" rel="stylesheet" type="text/css" media="all" />
        <link href="//d.stockcharts.com/css/scc-universal.css" rel="stylesheet" type="text/css" media="all" />
        <link href="//d.stockcharts.com/css/symbol-summary.css" rel="stylesheet" type="text/css">
        <link href="//d.stockcharts.com/freecharts/rrg/rrg-v3.css" rel="stylesheet" type="text/css">

        <!-- JS (SHARED) -->
        <script src="//d.stockcharts.com/js/scc-tables.js" type="text/javascript"></script>
        <script src="//d.stockcharts.com/vendor/jquery/3.6.0/jquery.min.js" type="text/javascript"></script>
        <script src="//d.stockcharts.com/freecharts/rrg/rrg-v3.js" type="text/javascript"></script>
        <script src="//d.stockcharts.com/freecharts/seasonality.js" type="text/javascript"></script>
        <script src="//d.stockcharts.com/freecharts/carpet.js" type="text/javascript"></script>

        <!-- JS (datatables) -->
        <script type="text/javascript" src="//d.stockcharts.com/vendor/dataTables/jquery/1.11.3/jquery.dataTables.min.js"></script>
        <script type="text/javascript" src="//d.stockcharts.com/vendor/dataTables/bootstrap/1.11.3/dataTables.bootstrap.min.js"></script>
        <script type="text/javascript" src="//d.stockcharts.com/vendor/dataTables/buttons/2.0.1/dataTables.buttons.min.js"></script>
        <script type="text/javascript" src="//d.stockcharts.com/vendor/dataTables/buttons/2.0.1/buttons.colVis.min.js"></script>

        <script src="//d.stockcharts.com/vendor/bootstrap/3.4.1/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="//d.stockcharts.com/js/scc-universal-v2.js" type="text/javascript"></script>
        <script src="//d.stockcharts.com/vendor/jquery-easing/1.4.1/jquery.easing.min.js" type="text/javascript" async></script>
        <script src="//d.stockcharts.com/vendor/jquery-ui/1.13.0/jquery-ui.min.js" type="text/javascript"></script>

OCR. The new Apple OCR available in KM is super fast and super amazing.

1 Like

You might be able to use

image

...maybe even nailing it down to the contents of the elements you're actually interested in. You haven't got as far as <body> in your snippet above, so it's difficult to tell how the page is rendered.

I routinely review the rendered HTML (not the source HTML) using this action:

1 Like