https://github.com/mskian/deno-cheerio-js
Cheerio - Porting Cheerio Node Module To Deno using esm.sh
https://github.com/mskian/deno-cheerio-js
cheerio cheerio-js cheeriojs deno deno-module denoland javascript nestland typescript
Last synced: 4 months ago
JSON representation
Cheerio - Porting Cheerio Node Module To Deno using esm.sh
- Host: GitHub
- URL: https://github.com/mskian/deno-cheerio-js
- Owner: mskian
- License: mit
- Created: 2022-08-20T13:44:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-20T16:29:11.000Z (almost 3 years ago)
- Last Synced: 2025-01-30T23:34:48.681Z (4 months ago)
- Topics: cheerio, cheerio-js, cheeriojs, deno, deno-module, denoland, javascript, nestland, typescript
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Cheerio
[](https://github.com/mskian/deno-cheerio-js/actions/workflows/test.yml)
Cheerio - Porting Cheerio Node Module To Deno using `esm.sh`
## Prerequisites
- Deno on your System
## Usage
- Cheerio Full Docs and usage -
```js
import { cheerio } from "https://deno.land/x/denocheerio/mod.ts";fetch(
"https://notes.santhoshveer.com/",
)
.then((result) => result.text())
.then((html) => {
const $ = cheerio.load(html);
const title = $('meta[property="og:title"]').attr("content") ||
$("title").text() || $('meta[name="title"]').attr("content");
const description = $('meta[property="og:description"]').attr("content") ||
$('meta[name="description"]').attr("content");
console.log(title);
console.log(description);
}).catch((error) => {
console.log(error);
});
```## Testing
```sh
deno run --allow-net --allow-read test.tsor
deno task test
```## Credits
- cheerio Npm Module -
## LICENSE
MIT