#! /bin/python3
#Imports
import sys
import datetime
#Basic usage
print()
print()
print('Hello User. Welcome to ProjGURU, an innovative but basic project made by Unfree\'s CEO, Gururam. The current date and time is {}. Let\'s get right into the project.'.format(datetime.datetime.now()))
print()
lay1 = input('Please choose which programme to download and load.\n1.Tor\n2.Opera\n3.Chrome')
print()
#lay1 splitted
if lay1 == '1':wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb如何执行wget命令
发布于 2020-02-03 21:03:12
如果您的主要目的是下载该文件,则可以使用requests库,就像Bruno在注释中指出的那样。通过命令行工具pip安装它
$ pip install requests然后,您可以import库并下载文件,如下所示:
import requests
# ... other code
if lay1 == '1':
with open('google-chrome-stable_current_amd64.deb', 'wb') as f:
r = requests.get('https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb')
f.write(r.content)https://stackoverflow.com/questions/60039557
复制相似问题