上传者: 38679178
|
上传时间: 2021-06-02 00:42:29
|
文件大小: 253KB
|
文件类型: PDF
# -*-coding:utf-8-*-
import urllib.request
from bs4 import BeautifulSoup
def getHtml(url):
"""获取url页面"""
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'}
req = urllib.request.Request(url,headers=heade