解析PHP DOM HTML并获取代码中的数据跨度绑定

时间:2019-07-17 23:18:57

标签: html-parsing php-parser

我需要帮助来获取具有数据绑定的span标签的值,我正在使用简单的php dom。

site = https://bitvalor.com

我需要获取以下提到的span标签的值:fmtNbr(index()。USDCOM(),true)

我想在网站顶部获取USD COM指数

       <div class="mui-row">
            <div id="ticker">
                <div class="mui-container">
                    <div class="mui-col-xs-2 mui-col-sm-2 mui-col-md-1 mui--text-nowrap"><span class="pro">USD COM</span><br/><span data- bind="text: fmtNbr(index().USDCOM(), true)"></span></div>
                    <div class="mui--hidden-xs mui--hidden-sm mui-col-md-1"><span class="pro">USD TUR</span><br/><span data-bind="text: fmtNbr(index().USDTUR(), true)"></span></div>
                    <div class="mui-col-xs-2 mui-col-sm-2 mui-col-md-1 mui--text-nowrap"><span class="pro">USD BRXBT</span><br/><span data-bind="text: fmtNbr(index().USDBTC(), true)"></span></div>
                    <div class="mui-col-xs-3 mui-col-sm-2 mui-col-md-1 mui--text-nowrap"><span class="pro">BRXBT/USDC</span><br/><span data-bind="text: fmtNbr(index().BRXBTUSDC(), true, 'USD')"></span></div>
                    <div class="mui--hidden-xs mui--hidden-sm mui-col-md-1"><span class="pro">BRXBT/USDT</span><br/><span data-bind="text: fmtNbr(index().BRXBTUSDT(), true, 'USD')"></span></div>
                    <div class="mui-col-xs-3 mui-col-sm-2 mui-col-md-1 mui--text-nowrap"><span class="pro">BTC/USD</span><br/><span data-bind="text: fmtNbr(index().BTCUSD(), true, 'USD')"></span></div>
                    <div class="mui-col-xs-2 mui-col-sm-2 mui-col-md-1"><span class="pro">&Aacute;GIO C</span><br/> <span data-bind="text: fmtNbr(index().BRSpreadC())"></span>%</div>
                    <div class="mui--hidden-xs mui--hidden-sm mui-col-md-1"><span class="pro">&Aacute;GIO T</span><br/> <span data-bind="text: fmtNbr(index().BRSpreadT())"></span>%</div>
                    <div class="mui--hidden-xs mui-col-sm-2 mui-col-md-4"> </div>
                </div>
            </div>
        </div>

0 个答案:

没有答案