- Python最常用抓网页库-Requests
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 = './wp-content/uploads/all_collect/262235_xyz/http://aqxbk.com/wp-content/uploads/2021/09/20210906070620-78.jpg'
r = requests.get(url)
print(r.content)
def savepng():
url = './wp-content/uploads/all_collect/262235_xyz/http://aqxbk.com/wp-content/uploads/2021/09/20210906070620-78.jpg'
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()
日常命令cd // 进入某目录 举例:cd /home/wwwroot ls // 查看当前目录文件 lsb_release -a // 查看系统版本 uname -r // 查看内核 uname -a // 查看内核/操作系统/CPU信息 head -n 1…
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧
请登录后发表评论
注册