Skip to content

Commit e3e7e29

Browse files
authored
#图片路径规则发生了变化
'<img src="(http://.*?)" alt="" />'是现有的规则
1 parent 79f5032 commit e3e7e29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spiderFile/one_img.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
for i in range(14, 1580):
77
url = temp + str(i)
88
page = requests.get(url).text
9-
reg = re.compile('src="(http://.*?\.jpg)"')
9+
reg = re.compile('<img src="(http://.*?)" alt="" />')
1010
img_url = re.findall(reg, page)
1111
if img_url != []:
1212
with open('./{}.jpg'.format(count), 'wb') as file:

0 commit comments

Comments
 (0)