Implementing images downloading

This commit is contained in:
Eduardo Riesco 2017-12-02 18:39:05 +00:00 committed by Offray Luna
parent a304e4847a
commit b9a49adf32

View File

@ -333,8 +333,12 @@ GrafoscopioNode >> demote [
GrafoscopioNode >> downloadImagesInto: folder [
"comment stating purpose of message"
self extractHtmlImages do: [ :each | |localFolder|
localFolder := (folder / each directory) ensureCreateDirectory.
self extractHtmlImages do: [ :each | |localFolder path|
path:=''.
(each directory substrings: '/') do: [ :eachDirectory |
path:= path , '/' , eachDirectory .
(folder / path) ensureCreateDirectory ].
localFolder := (folder / each directory).
ZnClient new
url: each ;
downloadTo: localFolder . ]