麻煩問一下大神看我對下面加粗代碼的理解是否正確
?def getImg(html):
? ?reg = r'src="(.+?\.jpg)" pic_ext'
? ?imgre = re.compile(reg)
? ?imglist = re.findall(imgre,html)
? ?x = 0
?r'src相當于調(diào)用正則表示是的格式,"(.+?\.jpg)" pic_ext'是要判斷的內(nèi)容的格式
?def getImg(html):
? ?reg = r'src="(.+?\.jpg)" pic_ext'
? ?imgre = re.compile(reg)
? ?imglist = re.findall(imgre,html)
? ?x = 0
?r'src相當于調(diào)用正則表示是的格式,"(.+?\.jpg)" pic_ext'是要判斷的內(nèi)容的格式
2017-03-15
舉報
2017-03-15
不是要判斷內(nèi)容的格式