puppeteer爬取数据问题
发布于 10 个月前 作者 quanpf2481 765 次浏览 来自 问答

网页的源代码如下(截取部分): <ul class=“lot-award”>

    <li class="logo"><a href="http://www.beijingsaiche.com/pk10/" title="赛车PK10">赛车PK10</a></li>
    <li class="currentAward">
        <div class="title"> 最新:</div>
        <div class="period" style="color: green;"><span style="color: green;" id="NoMini">0</span>&nbsp;期</div>
        <div class="period-info">每日<span id="OneDayOpenSum">--</span>期,今日剩余<span class="period-leave"
                                                                                 id="TodayTrueNo">0</span>期
        </div>
        <div class="lot-nums" id="Num"></div>
    </li>
    <li class="warnTime">
        <div class="title">
            <div style="color: green;font-weight:bold;">第<span style="color: green;font-weight:bold;"
                                                               id="NoWill">--</span>期
            </div>
            <div>距离下期剩余</div>
        </div>
        <div class="minute" id="Time_i">00</div>
        <div class="t2">分</div>
        <div class="second" id="Time_s">00</div>
        <div class="t2">秒</div>
        <div class="SoundOpen" id="Sound" title="点击关闭提醒声音" onclick="Sound();"></div>
        <audio src="http://www.beijingsaiche.com/static/pc_public/images/du.mp3" id="duSound" style="display:none;"></audio>
    </li>
    <li class="live">
        <a href="http://www.beijingsaiche.com/pk10/zb.html" title="赛车PK10开奖直播" target="_blank">直播</a>
    </li>
</ul>
这段代码中,我想要获得<div class="period" style="color: green;"><span style="color: green;" id="NoMini">0</span> 期</div>这句代码中的id的值,应该怎么来处理呢???
1 回复

/id=“NoMini”>(\d+)</i

回到顶部