We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c09b2a1 commit 1da4067Copy full SHA for 1da4067
crawler/index.js
@@ -97,11 +97,10 @@ class Crawler {
97
body = body.replace(regex, (_, url) => {
98
const filename = url.replace(/\/\s*$/,'').split('/').slice(-2).join('-');
99
const path = join('backup', 'images', filename);
100
-
101
axios({
102
method: 'get',
103
- url,
104
- responseType: 'stream'
+ url: encodeURI(url),
+ responseType: 'stream',
105
})
106
.then(resp => resp.data.pipe(fs.createWriteStream(path)))
107
.catch(e => console.error(`⚠️ 이미지를 다운 받는데 오류가 발생했습니다 / url = ${url} , e = ${e}`));
0 commit comments