article-extractor
article-extractor copied to clipboard
Unable to use this library on react-native
This is the error I get while using the extract function.
"Error: ENOENT: no such file or directory, open 'S:\tmp\hermes\staging\hermes\cmake\intlDebug\arm64-v8a\lib\InternalBytecode\InternalBytecode.js"
Initially, my app wouldn't even open as it couldn't find the 'html-crush' index file. So I moved the index.d.ts file from the types folder and into the root of the html-crush package folder and renamed it to index.ts, the app then started working.
I only care about the image attribute so is there any alternative to get that?
@eeshankeni hello, great that you made it work! I'm not familiar with TypeScript environment and no idea about the error InternalBytecode.js
you got at first.
By default, article-parser
is only looking to detect the main image from meta tags. If the website does not follow SEO standard, you may need to use DOM selector to find the best image from extracted content. Maybe the first one, or the largest one.
Resorted to using https://github.com/spykesocial/react-native-opengraph-scrapper in case anyone has this same issue in the future.