84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
爬取网页用下行遍历的找出了我要的标签,但第一个的内容我是不要的用.children好像无法跳出第一个标签
for tr in soup.find(id="endText").children: if tr.string is not None: a = tr.string
网页的内容:
原链接:http://digi.163.com/14/1115/0...
光阴似箭催人老,日月如移越少年。
p_list = list(soup.find(id="endText").find_all('p')) for p in p_list[1:]: text = p.get_text() img = p.find("img") if img: print img.get('src') if text: print text
光阴似箭催人老,日月如移越少年。