File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,18 @@ const downloadAudio = require('./downloadAudio.js');
45
45
audioTitle : columnArticle . audio_title
46
46
} ;
47
47
columnArticleUrlList . push ( articleInfo ) ;
48
+ // 替换文章名称的 / 线, 解决路径被分割的问题
49
+ let useArticleTtle = columnArticle . article_title . replace ( / \/ / g, '-' ) ;
48
50
//生成PDF
49
51
await generaterPdf ( articleInfo ,
50
- columnArticle . article_title + '.pdf' ,
52
+ useArticleTtle + '.pdf' ,
51
53
path . resolve ( __dirname , 'geektime_' + config . columnName )
52
54
) ;
53
55
// 是否下载音频
54
56
if ( config . isdownloadVideo ) {
55
57
await downloadAudio (
56
58
columnArticle . audio_download_url ,
57
- columnArticle . article_title + '.mp3' ,
59
+ useArticleTtle + '.mp3' ,
58
60
path . resolve ( __dirname , 'geektime_' + config . columnName )
59
61
) ;
60
62
} ;
You can’t perform that action at this time.
0 commit comments