27.1.3. File tools
27.1.3.1. Download file
Downloads a file specified using a URL (using for instance http:
or file:
).
In other words you can copy/paste a URL and download the file.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
URL |
|
[string] |
The URL of the file to download. |
File destination 可选 |
|
[string] 默认: |
Specification of the file destination. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Method |
|
[enumeration] Default: 0 |
The HTTP method to use for the request. Options are:
|
Data 可选 |
|
[string] |
The data to add in the body if the request is a POST. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
File destination |
|
[string] |
The location of the downloaded file |
Python代码
Algorithm ID: qgis:filedownloader
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。