2.Python3第三方库requests
2.1安装requests
由于requests是第三方库,因此在vs code上需要安装才能使用。
PS D:\> cd '.\Program Files (x86)\Python\Python37-32\Scripts\'
PS D:\Program Files (x86)\Python\Python37-32\Scripts> ls
目录: D:\Program Files (x86)\Python\Python37-32\Scripts
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2018/12/21 16:22 93065 easy_install-3.7.exe
-a---- 2018/12/21 16:22 93065 easy_install.exe
-a---- 2019/1/19 18:37 93051 f2py.exe
-a---- 2018/12/21 16:22 93047 pip.exe
-a---- 2018/12/21 16:22 93047 pip3.7.exe
-a---- 2018/12/21 16:22 93047 pip3.exe
PS D:\Program Files (x86)\Python\Python37-32\Scripts> pip install requests
Collecting requests
Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 26kB/s
Collecting idna<2.9,>=2.5 (from requests)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 13kB/s
Collecting urllib3<1.25,>=1.21.1 (from requests)
Downloading https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
100% |████████████████████████████████| 122kB 65kB/s
Collecting certifi>=2017.4.17 (from requests)
Downloading https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl (154kB)
100% |████████████████████████████████| 163kB 110kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec