初始化mmonth
This commit is contained in:
22
爬虫-01/resquests.py
Normal file
22
爬虫-01/resquests.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import requests
|
||||
from fake_useragent import UserAgent
|
||||
from urllib.parse import urlencode
|
||||
target_url = 'https://pic.netbian.com/tupian/42407.html?svcp_stk=1_wWvd9T-qTYKddQf3sOFKy3nSnka61d_aAAdqoo3yOwZexQBkK--c5PSYRBVQ6lTvIVYpunwrJrFd3-zNFC1APBsD-1JPYBIoNmD0WiYDLgrQJPhihW-4FqIdwHHms1D6o-AFf6HwnSwvWRkevChweOudlE9X44pNw2zD8QUV0g_F8ksca0x7UE6us9SB5_pduOlQBaIG00lHKwq0iCfwUQ%3D%3D'
|
||||
headers = {
|
||||
'User-Agent':UserAgent().random
|
||||
}
|
||||
params = {
|
||||
"query":"小米SU7 Ultra"
|
||||
}
|
||||
#session = requests.Session()
|
||||
#response = requests.get(url=target_url,headers=headers,params=params)
|
||||
#print(response.cookies.items())
|
||||
#response = session.get(url=target_url,headers=headers,params=params)
|
||||
response = requests.get(url=target_url,headers=headers)
|
||||
print(response.content)
|
||||
print(response.url)
|
||||
print(response.headers)
|
||||
print(response.status_code)
|
||||
print(response.history)
|
||||
# with open ('1.html','w',encoding='utf-8') as fp:
|
||||
# fp.write(response.text)
|
||||
Reference in New Issue
Block a user