python正则表达式提取中文

import urllib.request
import re
url='https://songsearch.kugou.com/song_search_v2?callback=jQuery1124072504848' \
'3545838_1560391960890&keyword=%E7%BB%BF%E8%89%B2&page=1&pagesize=30&userid=-1&clientver=&pla' \
'tform=WebFilter&tag=em&filter=2&iscorrection=1&privilege_filter=0&_=1560391960925'
response=urllib.request.urlopen(url,timeout=10)
html=response.read() # 获取到页面的源代码
p=html.decode('utf-8')
m=re.findall('[\u4e00-\u9fa5]',p)
print(m)
posted @ 2019-06-20 10:01  Bestone  阅读(10149)  评论(0编辑  收藏  举报