关于xpath的使用

How to use the Xpth

about '//' , '/' , and 'text()'

测试
 title = response.xpath('//div[@class="entry-header"]/h1/text()')

Look at the code under the sentence

//div[@class="entry-header"]/h1/text()

//div[class="entry-header"]
find the tag

which class is "entry-header" in the all text
/h1
find the tag

in the

/text()
get the text in the

你可能感兴趣的:(关于xpath的使用)