mirror of https://github.com/injetlee/Python.git
修改注释
parent
94faec41b8
commit
a3200cc319
|
@ -6,15 +6,12 @@ from bs4 import BeautifulSoup
|
|||
|
||||
|
||||
def download_page(url):
|
||||
'''
|
||||
用于下载页面
|
||||
'''
|
||||
#用于下载页面
|
||||
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"}
|
||||
r = requests.get(url, headers=headers)
|
||||
r.encoding = 'gb2312'
|
||||
return r.text
|
||||
|
||||
|
||||
def get_pic_list(html):
|
||||
'''
|
||||
获取每个页面的套图列表,之后循环调用get_pic函数获取图片
|
||||
|
|
Loading…
Reference in New Issue