User: shuaigemi -- 2010-01-18 << 398 400 >> |
Hits: 4671 |
Type: Batch download |
Search all Batch download examples |
Description: |
How to batch download images from some html pages and rename all the images? |
Input Sample: |
<img src="http://.../rgag.jpg" width="200" > (from file1.htm) <img src="http://.../hrth.jpg" width="200" > (from file2.htm) <img src="http://.../egse.jpg" width="200" > (from file3.htm) |
Output Sample: |
file1.jpg file2.jpg file3.jpg |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. First of all, you need batch extract the image links from html pages. (1)ctrl-h open 'Replace' dialog * enter "search for pattern" to: * enter "replace with pattern" to: * uncheck "print unmatched unit" option * between "Output Page" and "Output File" entry at right bottom, change the symbol ">" to ">> Append" (2) Click "Batch..." button to open "Batch Runner" window (3) Drag all html files from windows file explorer to "Batch Runner" window. (4) Check "Set output file name" option, and change "${FILENAME}" to "links.txt" at the following entry. (5) Click "Batch Replace" button, all the image links will be extracted and put to links.txt. 2. Download image files and rename: (1) Enter "Batch Runner" window again, click "Import List" to import links.txt you have made. (2) Check "set output filename" option, change ${FILENAME} to file#.jpg (3) Check "set output foler" option, set output folder (4) Click "Copy/Download", done! |
Download Script: scripts/399.rst.zip |
Screenshot 1: Replace_Window |
Screenshot 2: Batch_Runner_Window |