开发者

Python/Scrapy question: How to get cleaner results?

My task for a project is to data mine a website for specific names. My experience with python isn't high. When I scraped all the names, they come out in this format:

[u'Bob Joe']开发者_如何学Go

[u'Tim Tom']

[u'Anne Frank']

[u'superman']

How can I clean up these values? What does the 'u' signify? Is my xpath wrong? Would I have to clean it up in a scrapy pipeline (I'd like to avoid this)? I just want the names and not the extra junk around it.


In Python 2, the 'u' prefix indicates that it's a Unicode string. [u'Bob Joe'] is a list containing a Unicode string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜