Skip to content

Commit 326a4fb

Browse files
authored
Merge pull request yhangf#3 from bigablecat/patch-1
#图片路径规则发生了变化
2 parents 79f5032 + e3e7e29 commit 326a4fb

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)