如何将 url 作为变量传递给 wget ..?

Nai*_*ive 3 python wget

我正在尝试通过传递使用 python 保存 url 的变量来使用 wget 下载页面,但它没有用。

url=http://www.example.com/support/security/


os.system("wget -P download url")
Run Code Online (Sandbox Code Playgroud)

任何人都可以指定这有什么问题......?

job*_*bin 9

蟒蛇代码:

import os

url="http://www.adobe.com/support/security/"
os.system('wget %s' %url)
Run Code Online (Sandbox Code Playgroud)

重击代码:

url="http://www.adobe.com/support/security/"
wget $url
Run Code Online (Sandbox Code Playgroud)