import requests
def  text():
    url = 'https://lyvba.com/gettime.php'
    r = requests.get(url)
    print(r.text)

def  headers():
    url = 'https://lyvba.com'
    r = requests.get(url)
    print(r.headers)

def  content():
    url = 'https://lyvba.com/logo/262235.png'
    r = requests.get(url)
    print(r.content)

def  savepng():
    url = 'https://lyvba.com/logo/262235.png'
    r = requests.get(url)
    with open('logo.png', mode='wb') as file:
        file.write(r.content)

def  save7zip():
    url = 'https://lyvba.com/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()
分类: 学习编程

0 条评论

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注