二 解析网页中元素

一 使用beautifulSoup 解析网页

 Soup = BeantifulSoup(html,'lxml')

二 描述需要爬取的东西在哪?

  = Soup.select('???')

三 从标签中获得你要的信息

  <p>Something</p> 去掉标签,并放到数据容器中。

title.get_text() > Something

title.tripped_strings>获取title目录下,所有标签。

python 可以做列表》list(title.tripped_strings)

  {title = Something ; rate = 4.0}

 

posted @ 2017-03-06 23:15  记得万物的源头  阅读(206)  评论(0编辑  收藏  举报