ringa_lee2017-04-18 09:25:20
subprocess.check_output(["curl -s cip.cc"],shell=True)
man curl
-s, --silent
Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it.
PHPz2017-04-18 09:25:20
Try the following code:
subprocess.check_output(["curl -s cip.cc"],shell=True)
I don’t know what platform you are using curl -h
Take a look at the parameter settings
怪我咯2017-04-18 09:25:20
For example, are there any difficulties in using the standard library? Do you need system calls? When calling curl through subprocess, you have to manually handle various exceptions such as timeout, stderr, stdout, and process return code...urllib