最近在学习python爬虫,用的scrapy,基本流程都通顺了,但是发现解析页面中文的时候比较头大。
比如抽取到的内容可能含有 《 【 等字符,这个时候怎么处理?
另外,xpath搜索的时候也有可能需要通过中文匹配,怎么破?
天蓬老师2017-04-17 17:47:17
You can consider using regular matching.
Refer to this article: http://blog.csdn.net/gatieme/article/details/43235791
ringa_lee2017-04-17 17:47:17
Python3 is much better than python2 in this regard. If you can recommend using python3