臨時(shí)看到的,我就不寫了碍扔,做一個(gè)搬運(yùn)工。
取到要取文字的上一級(jí)標(biāo)簽
bloger = selector.xpath("http://a[@class='author-name blue-link']")
取文字
print bloger[0].xpath('string(.)').strip()
from here :
http://blog.csdn.net/MrLevo520/article/details/53158050
thanks