python3初學者,練習使用爬蟲抓取網頁,隨機找了個小說網站抓取,抓取html源代碼沒有問題,但是使用正則表達式,出現抓取數據后直接卡死,請問如何調試?import urllib.requestimport reurl = 'http://book.669977.net/xiuxiankuangtu/chapter.html'response = urllib.request.urlopen(url)html = response.read().decode('gbk')url_number = re.findall('href="(/\w{5,20}/\d{3,8})',html)print(url_number)
python3爬蟲正則表達式卡頓
慕運維8079593
2018-10-10 08:16:52