npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mma-api

v1.0.3

Published

NodeJS based MMA-API providing fighter's data by crawling Sherdog

Downloads

144

Readme

mma-api

NodeJS based MMA-API providing fighter's data by crawling Sherdog

Cathegory

Manual

Installation

npm install mma-api

Usage

//by callback function
const mma = require('mma-api');
mma.api('Korean Zombie', (data) => {
	console.log(data);
});

//by return value
const mma = require('mma-api');
const index = async () => {
	const data = await mma.api('Korean Zombie');
	console.log(data);
}
index();

//Result is
{
	"url": "https://www.sherdog.com/fighter/Chan-Sung-Jung-36155",
	"name": "Chan Sung Jung",
	"nickname": "The Korean Zombie",
	"age": "34",
	"birthday": "Mar 17, 1987",
	"locality": "Gyeongju, North Gyeongsang",
	"nationality": "South Korea",
	"association": "Fight Ready",
	"height": "5'9\" / 175.26 cm",
	"weight": "145 lbs / 65.77 kg",
	"weight_class": "Featherweight",
	"image_url": "/image_crop/200/300/_images/fighter/1601319214Chan_Sung_Jung.jpg",
	"wins": { "total": 17, "knockouts": 6, "submissions": 8, "decisions": 3, "others": 0 },
	"losses": { "total": 6, "knockouts": 3, "submissions": 0, "decisions": 3, "others": 0 },
	"no_contests": 0,
	"fights": [
		{
			"name": "UFC on ESPN 25 - Korean Zombie vs. Ige",
			"date": "Jun / 19 / 2021",
			"opponent": "Dan Ige",
			"result": "win",
			"method": "Decision (Unanimous)",
			"referee": "Herb Dean",
			"round": "5",
			"time": "5:00",
			"event_url": "/events/UFC-on-ESPN-25-Korean-Zombie-vs-Ige-88795",
			"opponent_url": "/fighter/Dan-Ige-136499"
		},
		{
			"name": "UFC Fight Night 180 - Ortega vs. Korean Zombie",
			"date": "Oct / 17 / 2020",
			"opponent": "Brian Ortega",
			"result": "loss",
			"method": "Decision (Unanimous)",
			"referee": "Lukasz Bosacki",
			"round": "5",
			"time": "5:00",
			"event_url": "/events/UFC-Fight-Night-180-Ortega-vs-Korean-Zombie-87277",
			"opponent_url": "/fighter/Brian-Ortega-65310"
		},
		{
			"name": "UFC Fight Night 165 - Edgar vs. Korean Zombie",
			"date": "Dec / 21 / 2019",
			"opponent": "Frankie Edgar",
			"result": "win",
			"method": "TKO (Punches)",
			"referee": "Marc Goddard",
			"round": "1",
			"time": "3:18",
			"event_url": "/events/UFC-Fight-Night-165-Edgar-vs-Korean-Zombie-76609",
			"opponent_url": "/fighter/Frankie-Edgar-14204"
		},
		//...
}

Issue

robots.txt and legal issue

This software parses Google's search pages to improve the accuracy of the search. It has many positive results, such as detecting typos and selecting more frequently searched fighters in cases of duplicate named ones.

However checking Google and Sherdog's "robots.txt", Sherdog completely allowed the search of robots, but Google did not allow the /search pages.

Although "robots.txt" does not hold a legal effect(meaning simple crawling is not illegal), there are precedents of legal punishements in which financial benefits were taken by crawling unauthorized pages. If a legal issues arise by using this module, module developer has no responsibility under the license.