import requests
def text():
url = 'https://262235.xyz/gettime.php'
r = requests.get(url)
print(r.text)
def headers():
url = 'https://262235.xyz'
r = requests.get(url)
print(r.headers)
def content():
url = 'https://262235.xyz/logo/262235.png'
r = requests.get(url)
print(r.content)
def savepng():
url = 'https://262235.xyz/logo/262235.png'
r = requests.get(url)
with open('logo.png', mode='wb') as file:
file.write(r.content)
def save7zip():
url = 'https://262235.xyz/linux-command/linux-command.7z'
r = requests.get(url)
with open('linux-command.7z', mode='wb') as file:
file.write(r.content)
text()
headers()
# content()
# savepng()
# save7zip()
本原创文章自由转载,转载请注明本博来源及网址 | 当前页面:
兰雅sRGB个人笔记 »
python requests 库学习