你每页的第一个爬取数据是下面这个,没有 你选择的属性<li '="" class="j_thread_list thread_top j_thread_list clearfix" data-field='{"id":1,"author_name":null,"author_nickname":null,"author_portrait":null,"first_post_id":null,"reply_num":0,"is_bakan":null,"vid":null,"is_good":null,"is_top":true,"is_protal":null,"is_membertop":null,"is_multi_forum":null,"frs_tpoint":null}' data-floor="0" data-thread-type="0" data-tid="1">
<div class="t_con cleafix">
<a class="j_thread_hidden icon_thread_hidden" data-field='{"tid":1}' href="javascript:;" rel="noreferrer" title="点击隐藏本贴"></a>
<div class="col2_left j_threadlist_li_left">
</div>
<div class="col2_right j_threadlist_li_right">
<div class="threadlist_lz clearfix">
<div class="threadlist_title pull_left j_th_tit">
<i alt="招募" class="icon-bazhurecruit" title="招募"></i>
<a class="j_th_tit" href="/bawu2/errorPage?bz=1" rel="noreferrer" target="_blank" title="本吧吧主火热招募中,点击参加">本吧吧主火热招募中,点击参加</a>
</div> </div>
</div>
</div>
</li>
page_lst.pop(0),排除这个内容就行 |