Hi! I'm trying to use wget with subprocess
.
my attempts worked until I tried to download the page to a specified directory with this code:
url = 'google.com'
location = '/home/patrick/downloads'
args = ['wget', 'r', 'l 1' 'p' 'P %s' % location, url]
output = Popen(args, stdout=PIPE)
if I run this code in /home/patrick
I get index.html
in /home/patrick
and not in /home/patrick/downloads
.
Can you help me?
Thanks ;)