-
-
Save MikeChongCan/5cf2fd26c1141d617afa81938f35420f to your computer and use it in GitHub Desktop.
React Native: Parsing/Crawling HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # React Native: Parsing/Crawling HTML | |
| ## Ugly Way | |
| [xmldom](https://www.npmjs.com/package/xmldom) + [xpath](https://www.npmjs.com/package/xpath) | |
| ## Much Better Way | |
| [cheerio][https://www.npmjs.com/package/cheerio]. | |
| Note: You MUST also install `buffer`, `events` and `stream` to avoid dependency errors. | |
| In the past, cheerio uses `fs` so that it is not possible to use it in the environment of react native. But now it works fine. | |
| Just enjoy it! | |
| Sample App for it: [Den](https://github.com/asamiller/den) . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment