Coder Social home page Coder Social logo

feranmi-star90 / mdl-scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sujalgoel/mdl-scraper

0.0 0.0 0.0 23 KB

A npm package for scraping data from mydramalist

Home Page: https://www.npmjs.com/package/mdl-scraper

License: GNU General Public License v3.0

JavaScript 100.00%

mdl-scraper's Introduction

MDL Scraper

Version License: GPL-3.0

What is this package?

A npm package for scraping data from mydramalist.

Install the package πŸ“₯

npm i mdl-scraper

Example ✏️

SearchQuery example
const { mdl } = require("mdl-scraper");

mdl.SearchQuery("song-joong-ki").then((data) => {
  console.log(data);
});

Example Response

{
   "dramas":[
      {
         "slug":"40775-i-m-real-song-joong-ki",
         "url":"https://mydramalist.com/40775-i-m-real-song-joong-ki",
         "thumb":"https://i.mydramalist.com/RZREzs.jpg?v=1",
         "mdl_id":"mdl-40775",
         "title":"I'm Real Song Joong Ki",
         "ranking":"#8857",
         "type":"Korean TV Show",
         "year":"2011",
         "series":"2 episodes"
      }
   ],
   "people":[
      {
         "slug":"people/431-song-joong-ki",
         "url":"https://mydramalist.com/people/431-song-joong-ki",
         "thumb":"https://i.mydramalist.com/1kymd_5v.jpg",
         "name":"Song Joong Ki",
         "nationality":"South Korean"
      }
   ]
}
FetchQuery example
const { mdl } = require("mdl-scraper");

mdl.FetchQuery("61371-vincenzo").then((data) => {
  console.log(data);
});

Example Response

{
   "title":"Vincenzo",
   "rating":9,
   "poster":"https://i.mydramalist.com/vAnBe_4c.jpg?v=1",
   "synopsis":"At the age of eight, Park Joo Hyeong went to Italy after being adopted. Now an adult, he is known as Vincenzo Cassano to the Mafia, who employ him as a consigliere. Because mafia factions are at war with each other, he flees to South Korea, where he gets involved with Lawyer Hong Cha Young. She is the type of attorney who will do anything to win a case. Now back at his motherland, he gives an unrivaled conglomerate a taste of its own medicine with a side of justice.(Source: Netflix, AsianWiki) his motherland, he gives an unrivaled conglomerate a taste of its own medicine with a side of justice.(Source: Netflix, AsianWiki)",
   "cast":[
      {
         "slug":"people/431-song-joong-ki",
         "name":"Song Joong Ki",
         "url":"https://mydramalist.com/people/431-song-joong-ki"
      },
      {
         "slug":"people/18974-jeon-yeo-bin",
         "name":"Jeon Yeo Bin",
         "url":"https://mydramalist.com/people/18974-jeon-yeo-bin"
      },
      {
         "slug":"people/423-ok-taec-yeon",
         "name":"Ok Taec Yeon",
         "url":"https://mydramalist.com/people/423-ok-taec-yeon"
      },
      {
         "slug":"people/3264-kim-yeo-jin",
         "name":"Kim Yeo Jin",
         "url":"https://mydramalist.com/people/3264-kim-yeo-jin"
      },
      {
         "slug":"people/5409-jo-han-chul",
         "name":"Jo Han Chul",
         "url":"https://mydramalist.com/people/5409-jo-han-chul"
      },
      {
         "slug":"people/5101-kwak-dong-yeon",
         "name":"Kwak Dong Yeon",
         "url":"https://mydramalist.com/people/5101-kwak-dong-yeon"
      }
   ],
   "trailer":[
      "https://mydramalist.com/61371-vincenzo/trailers/21661",
      "https://mydramalist.com/61371-vincenzo/trailers/21721",
      "https://mydramalist.com/61371-vincenzo/trailers/21883",
      "https://mydramalist.com/61371-vincenzo/trailers/22067"
   ],
   "details":{
      "country":"South Korea",
      "type":"Drama",
      "episodes":"20",
      "aired":"Feb 20, 2021 - May  2, 2021",
      "aired_on":"Saturday, Sunday",
      "original_network":"tvN  Netflix  Netflix  Netflix  Netflix",
      "duration":"1 hr. 25 min.",
      "score":"9.0 (scored by 18,530 users)",
      "ranked":"#19",
      "popularity":"#103",
      "content_rating":"15+ - Teens 15 or older",
      "watchers":"38,095",
      "favorites":"0"
   },
   "others":{
      "native_title":"λΉˆμ„Όμ‘°",
      "also_known_as":"Binsenjo",
      "screenwriter":"Park Jae Bum",
      "director":"Kim Hee Won",
      "genres":"Comedy,  Law,  Romance,  Crime,  Drama",
      "tags":"Lawyer,   Smart Male Lead,   Mafia,   Eccentric Female Lead,   Competent Protagonist,   Suspense,   Charming Male Lead,   Father-Daughter Relationship,   Injustice,   Funny Female Lead  (Vote or add tags)"
   }
}
FetchPerson example
const { mdl } = require("mdl-scraper");

mdl.FetchPerson("5647-bong-joon-ho").then((data) => {
  console.log(data);
});

Example Response

{
   "name":"Bong Joon Ho",
   "about":"`Bong Joon Ho  Name: Bong Joon Ho  Native name: λ΄‰μ€€ν˜Έ    Nationality: South Korean Gender: Male  Born: September 14, 1969   Age: 51 Bong Joon-ho is a South Korean film director and screenwriter. Bong in general is known as being a director who takes a great interest in film genres, while simultaneously trying to move beyond genre's usual boundaries. Also known for the pure craft and finished quality of his works, Korean film industry insiders have nicknamed him \"Bong Tae-il,\" which, pronounced in Korean, sounds similar to the word \"detail\". Though he displays a fascination for strong subject matter, at the same time, his films are filled with (often black) humor and sudden mood shifts, making for an emotional roller coaster ride. The fact that he is able to combine all these contrasting elements into such a smooth whole is Bong's particular strength as a filmmaker. In 2019, director, Bong Joon-ho won the Cannes Palm d'Or (Grand Prize) for his movie Parasite. This is the first Korean film to ever win the award.`",
   "profile":"https://i.mydramalist.com/dWLK5_5c.jpg",
   "first_name":"Joon Ho",
   "family_name":"Bong",
   "native_name":"λ΄‰μ€€ν˜Έ",
   "nationality":"South Korean",
   "gender":"Male",
   "born":"September 14, 1969",
   "age":"51"
}

Contributing 🀝

  • Contributions, issues and feature requests are welcome!
  • Feel free to check issues page.

Author πŸ’–

Copyright Β© 2021 Sujal Goel πŸ‘€

Support ❓

mdl-scraper's People

Contributors

sujalgoel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.