File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ const extractFromFile = async (fpath) => {
32
32
const html = readFileSync ( fpath , 'utf8' )
33
33
const art = await extractFromHtml ( html )
34
34
console . log ( art )
35
+ if ( art ) {
36
+ const slug = slugify ( art . title )
37
+ writeFileSync ( `evaluation/${ slug } .html` , art . content , 'utf8' )
38
+ }
35
39
} catch ( err ) {
36
40
console . trace ( err )
37
41
}
Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 8.0.16 " ,
2
+ "version" : " 8.0.17 " ,
3
3
"name" : " @extractus/article-extractor" ,
4
4
"description" : " To extract main article from given URL" ,
5
5
"homepage" : " https://github.com/extractus/article-extractor" ,
32
32
"dependencies" : {
33
33
"@mozilla/readability" : " ^0.5.0" ,
34
34
"bellajs" : " ^11.2.0" ,
35
- "cross-fetch" : " ^4.0 .0" ,
36
- "linkedom" : " ^0.18.5 " ,
37
- "sanitize-html" : " 2.13.1 "
35
+ "cross-fetch" : " ^4.1 .0" ,
36
+ "linkedom" : " ^0.18.9 " ,
37
+ "sanitize-html" : " 2.14.0 "
38
38
},
39
39
"devDependencies" : {
40
40
"@types/sanitize-html" : " ^2.13.0" ,
41
- "eslint" : " ^9.14 .0" ,
42
- "globals" : " ^15.12 .0" ,
43
- "https-proxy-agent" : " ^7.0.5 " ,
44
- "nock" : " ^13.5.5 "
41
+ "eslint" : " ^9.20 .0" ,
42
+ "globals" : " ^15.14 .0" ,
43
+ "https-proxy-agent" : " ^7.0.6 " ,
44
+ "nock" : " ^14.0.1 "
45
45
},
46
46
"keywords" : [
47
47
" article" ,
You can’t perform that action at this time.
0 commit comments