중요
번역은 여러분이 참여할 수 있는 커뮤니티 활동입니다. 이 페이지는 현재 70.80% 번역되었습니다.
24.1.4. 파일 도구
24.1.4.1. Download file via HTTP(S)
Downloads a URL to the file system with an HTTP(S) GET or POST request.
파라미터
기본 파라미터
라벨 |
이름 |
유형 |
설명 |
---|---|---|---|
URL |
|
[string] |
다운로드할 파일의 URL |
File destination |
|
[string] 기본값: |
파일 저장 위치를 지정합니다. 다음 가운데 하나를 선택할 수 있습니다:
|
고급 파라미터
라벨 |
이름 |
유형 |
설명 |
---|---|---|---|
Method |
|
[enumeration] 기본값: 0 |
요청을 위해 사용할 HTTP 메소드입니다. 다음 옵션을 사용할 수 있습니다:
|
Data 선택적 |
|
[string] |
요청이 POST인 경우 본문(body)에 추가할 데이터입니다. |
산출물
라벨 |
이름 |
유형 |
설명 |
---|---|---|---|
File destination |
|
[string] |
다운로드한 파일을 저장한 위치 |
파이썬 코드
알고리즘 ID: qgis:filedownloader
import processing
processing.run("algorithm_id", {parameter_dictionary})
공간 처리 툴박스에 있는 알고리즘 위에 마우스를 가져가면 알고리즘 ID 를 표시합니다. 파라미터 목록(dictionary) 은 파라미터 이름 및 값을 제공합니다. 파이썬 콘솔에서 공간 처리 알고리즘을 어떻게 실행하는지 자세히 알고 싶다면 콘솔에서 공간 처리 알고리즘 사용 을 참조하세요.
24.1.4.2. HTTP(S) POST/GET request
Performs a HTTP(S) POST/GET request and returns the HTTP status code and the reply data. If an error occurs then the error code and the message will be returned. Optionally, the result can be written to a file on the disk. By default the algorithm will warn on errors. Optionally, the algorithm can be set to treat HTTP errors as failures.
파라미터
라벨 |
이름 |
유형 |
설명 |
---|---|---|---|
URL or file path |
|
[string] |
The URL or path of the file to open. |
Method |
|
[enumeration] 기본값: 0 |
요청을 위해 사용할 HTTP 메소드입니다. 다음 옵션을 사용할 수 있습니다:
|
POST Data 선택적 |
|
[string] |
요청이 POST인 경우 본문(body)에 추가할 데이터입니다. |
Authentication 선택적 |
|
[authconfig] Default: No authentication |
An authentication configuration to pass |
Consider HTTP errors as failures |
|
[boolean] Default: False |
If set, the algorithm will fail on encountering an HTTP error. |
File destination 선택적 |
|
[string] Default: |
The result can be written to a file instead of being returned as a string. Specification of the file destination. One of:
|
산출물
라벨 |
이름 |
유형 |
설명 |
---|---|---|---|
File destination |
|
[file] |
The downloaded file with the returned result |
HTTP Status |
|
[string] |
The HTTP Status |
Network error code |
|
[string] |
The error code when it fails (like as well on 404 HTTP Status etc.) |
Network error message |
|
[string] |
A string containing the error message in case of failure |
Result data |
|
[string] |
A string containing the result data in case of success |
파이썬 코드
Algorithm ID: native:httprequest
import processing
processing.run("algorithm_id", {parameter_dictionary})
공간 처리 툴박스에 있는 알고리즘 위에 마우스를 가져가면 알고리즘 ID 를 표시합니다. 파라미터 목록(dictionary) 은 파라미터 이름 및 값을 제공합니다. 파이썬 콘솔에서 공간 처리 알고리즘을 어떻게 실행하는지 자세히 알고 싶다면 콘솔에서 공간 처리 알고리즘 사용 을 참조하세요.
24.1.4.3. Open file or URL
Opens files in their default associated application, or URLs in the user’s default web browser.
파라미터
라벨 |
이름 |
유형 |
설명 |
---|---|---|---|
URL or file path |
|
[string] |
The URL or path of the file to open. |
산출물
The algorithm has no output.
파이썬 코드
Algorithm ID: native:openurl
import processing
processing.run("algorithm_id", {parameter_dictionary})
공간 처리 툴박스에 있는 알고리즘 위에 마우스를 가져가면 알고리즘 ID 를 표시합니다. 파라미터 목록(dictionary) 은 파라미터 이름 및 값을 제공합니다. 파이썬 콘솔에서 공간 처리 알고리즘을 어떻게 실행하는지 자세히 알고 싶다면 콘솔에서 공간 처리 알고리즘 사용 을 참조하세요.