@shineiichijo/mal-news-scraper
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

mal-news-scraper

NPM

Scrap news contents from MyAnimeList


Installation

yarn add @shineiichijo/mal-news-scraper

Usage

import { scrapNews } from '@shineiichijo/mal-news-scraper'
;(async () => {
    const id = 66853767
    const data = await scrapNews(id)
    console.log(data)
})()

Output

{
    "id": "66853767",
    "url": "https://myanimelist.net/news/66853767",
    "image": "https://cdn.myanimelist.net/s/common/uploaded_files/1657685189-06702246fa60423ef634534239999439.jpeg",
    "description": "The official website of the One Piece Film: Red anime movie revealed a pair ....",
    "title": "'One Piece Film: Red' Reveals Additional Pair of Cast"
}

Scrapping with mal-scraper

import { getNewsNoDetails } from 'mal-scraper' //yarn add mal-scraper
import { scrapNews } from '@shineiichijo/mal-news-scraper'
;(async () => {
    const news = await getNewsNoDetails()
    const link = news[0].link // --> https://myanimelist.net/news/66853767
    const data = await scrapNews(link)
    console.log(data)
})()

Package Sidebar

Install

npm i @shineiichijo/mal-news-scraper

Weekly Downloads

31

Version

0.0.2

License

MIT

Unpacked Size

7.6 kB

Total Files

7

Last publish

Collaborators

  • shineiichijo