剛寫代碼報(bào)錯(cuò):AttributeError: 'unicode' object has no attribute 'xpath'
場(chǎng)景是這樣的:

然后運(yùn)行就報(bào)錯(cuò):AttributeError: 'unicode' object has no attribute 'xpath'
開始上網(wǎng)找了很多解決辦法都沒用,后來看到了這里的解決辦法:
http://stackoverflow.com/questions/31586169/attributeerror-unicode-object-has-no-attribute-xpath-issue
還有段話這樣說的:

使用lxml將 i 轉(zhuǎn)化下,才能正常使用,現(xiàn)在是這樣做的:
