Casperjs通过list标签抓取DOM元素循环

时间:2018-05-03 07:23:38

标签: phantomjs casperjs

<div id="joblist-panel">
<ul class="list-job-box">
    <li id="row" class="row bt-gray-border job white-bg list-arrow">

        <div class="circle-outline">
            <div class="circle-job circle-color" style="background-color: transparent; border: 1px solid rgb(183, 183, 183);">
                <div class="circle-inner">
                    <div class="score-text"><i class="fa fa-file-text-o"></i></div>
                </div>
            </div>
        </div>
        <a href="#test/test1" class="job-title">title</a>
        <div class="row list-job">
            <ul>
                <li>
                    <div><i class="icon-glyph-111"></i></div>
                    3-6 Years
                </li>

                <li>
                    <div><i class=" icon-glyph-83"></i></div>
                    1&nbsp;Opening
                </li>
                <li class="location-text"><i class=" icon-glyph-14"></i>
                    Bengaluru
                </li>
            </ul>
        </div>
    </li>
</ul>

有这样的内容,我想循环所有'li'标签并获得'a'标签的href和list-job类的innertext。我们如何通过casperjs实现这一点,phantomjs

0 个答案:

没有答案