Bỏ qua tới nội dung chính
DemoZalo 0862020654

Tương tác

Lưu tài nguyên

Lưu tài nguyên (ảnh, video, âm thanh, file) từ phần tử hoặc từ URL

Mã block: save-assets

Bảng cấu hình của khối Lưu tài nguyên trong trình soạn workflow.
Bảng cấu hình của khối, đúng như trong trình soạn thảo.

Đầu vào

TênKiểuMặc địnhMô tả
disableBlockbooleanfalseTắt khối này
descriptionstring—Mô tả khối
findByselectcssSelectorLoại selector
cssSelectorxpath
selectorbắt buộcstring—CSS selector hoặc XPath
waitForSelectorbooleanfalseChờ selector xuất hiện
waitSelectorTimeoutnumber5000Thời gian chờ selector (ms)
markElbooleanfalseLàm nổi bật phần tử
multiplebooleanfalseChọn nhiều phần tử
saveTypeselectelementLấy từ phần tử hay từ URL

Ví dụ: element

elementurl
urlstring—URL tài nguyên (chế độ URL)
filenamestring—Tên file tùy chỉnh
onConflictselectuniquifyKhi trùng tên file

Ví dụ: uniquify

uniquifyoverrideskip
saveDownloadIdsbooleanfalseGhi lại ID lượt tải
saveDatabooleantrueChèn vào bảng dữ liệu của workflow
dataColumnstring—Tên cột trong bảng
assignVariablebooleanfalseGán vào biến
variableNamestring—Tên biến

Đầu ra

  • filePathstring

    Saved file path