Skip to content

Commit 6ce2cc8

Browse files
committed
fix bug
1 parent 4fb9c36 commit 6ce2cc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

爬虫集合/meizitu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_pic(link, text):
4040
for i in pic_list:
4141
pic_link = i.get('src') # 拿到图片的具体 url
4242
r = requests.get(pic_link, headers=headers) # 下载图片,之后保存到文件
43-
with open('pic/{}/{}'.format(text, link.split('/')[-1]), 'wb') as f:
43+
with open('pic/{}/{}'.format(text, pic_link.split('/')[-1]), 'wb') as f:
4444
f.write(r.content)
4545
time.sleep(1) # 休息一下,不要给网站太大压力,避免被封
4646

0 commit comments

Comments
 (0)