临时看到的,我就不写了,做一个搬运工。
取到要取文字的上一级标签
bloger = selector.xpath("//a[@class='author-name blue-link']")
取文字
print bloger[0].xpath('string(.)').strip()
from here :
http://blog.csdn.net/MrLevo520/article/details/53158050
thanks
临时看到的,我就不写了,做一个搬运工。
bloger = selector.xpath("//a[@class='author-name blue-link']")
print bloger[0].xpath('string(.)').strip()
from here :
http://blog.csdn.net/MrLevo520/article/details/53158050
thanks