Save Assets
Download content (images, videos, audio, or files) from an element or URL.
Type
Retrieve content types available in the selector image, audio, or video.
Image, Audio, or Video Element
Based on the CSS selector
URL
Select a URL available in the selector, such as the URL of google
Element Selector
Select the element and input it using element selector.
Selector Options
Choose the desired options
File Name
The name of an existing file; leave blank if you want to save to a new file
On conflict
When saving with a file name that already exists on the device, you can use the following options
- Uniquify: Automatically rename the file to differ from the existing file
- Overwrite: Replace the existing file
- Prompt: You can choose to replace or create a new file and save the content to it
Save downloaded file paths
Save the download path to a variable or table
Assign to Variable
You can assign the path to a Variable
- Variable Name: Enter the name of the variable to assign the text to. This field is optional when you select
Assign to Variable
Insert into Table
You can select a column in a Table to assign the text to that column.
- Select Column: The column where the text will be inserted. This field is optional when you select
Insert into Table
Practical Example
I will use this node in the data scraping process on the tradingview website
Here, I want to retrieve images from posts. Normally, I could use the Take Screenshot
node to download images, but this website adds a logo overlay on the images. Therefore, I need to download directly via the link using the Save Assets
node
First, I need to identify a common selector for the elements containing the images to be downloaded for use in the Loop Data
node. I will use this node to iterate through the list of elements containing images with the desired quantity. I want to iterate through two image elements, so I will enter the value 2
in the Maximum number of iterations
field. I will configure the Loop Data
node as follows
Next, configure the Save Assets
node to download the images from each element containing an image iterated by the Loop Data
node. Here, I configure the image storage directory at E:\Image
, then select Save downloaded file paths
to store the image paths after downloading to the device for use in other processes. Finally, I choose to insert into the link
column so that when the image download is complete, I will use the Export Data
node to export the paths in the table’s column to a file.
Then, I will connect to the Stop Loop
node to mark the end of the iteration. Finally, connect to the Export Data
node to export the image path data
I will have a node cluster used to download images and save image paths as follows
When running, I will get the results of the file paths as shown in the image