Stories

Detail Return Return

xpath匹配一個標籤下所有內容 - Stories Detail

from lxml import etree
import requests

url = 'http://www.shihuo.cn/youhui/474770.html#qk=youhui_list'
response = requests.get(url)
text = etree.HTML(response.text)

tt = text.xpath("//div[@class='article']")
info = tt[0].xpath("string(.)")

user avatar u_17494575 Avatar u_17353607 Avatar u_14540126 Avatar u_15505879 Avatar itwhat Avatar xingchendahai_68d7dff410962 Avatar yejianfeixue Avatar chiqingdezhentou Avatar haoqidedalianmao Avatar lintp Avatar yanyingjie Avatar gqkmiss Avatar
Favorites 18 users favorite the story!
Favorites

Add a new Comments

Some HTML is okay.