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 [ GrafoscopioNode >> downloadImagesInto: folder [
"comment stating purpose of message" "comment stating purpose of message"
self extractHtmlImages do: [ :each | |localFolder| self extractHtmlImages do: [ :each | |localFolder path|
localFolder := (folder / each directory) ensureCreateDirectory. path:=''.
(each directory substrings: '/') do: [ :eachDirectory |
path:= path , '/' , eachDirectory .
(folder / path) ensureCreateDirectory ].
localFolder := (folder / each directory).
ZnClient new ZnClient new
url: each ; url: each ;
downloadTo: localFolder . ] downloadTo: localFolder . ]