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

@darkside-developers/cricket-details

v1.0.2

Published

cricket unofficial scraper

Downloads

8

Readme

@darkside-developers/cricket-details

npm npm

A Node.js library for fetching cricket match details, live scores, match news, featured matches, upcoming matches, and recently concluded matches.

Installation

npm install @darkside-developers/cricket-details

Usage & Result

Live Matches Urls

// Get Live matches urls
const { cricket } = require('@darkside-developers/cricket-details');

const matchDetails = cricket.match_url();
console.log(matchDetails);
[
  {
    "title": "Match Title 1",
    "link": "https://www.cricbuzz.com/match1"
  },
  {
    "title": "Match Title 2",
    "link": "https://www.cricbuzz.com/match2"
  },
  ...
]

Live Matches Score

// Get Live matches score
const { cricket } = require('@darkside-developers/cricket-details');

const liveScore = cricket.live_score('https://www.example.com/live-match');
console.log(liveScore);
{
  "status": true,
  "creator": {
    "name": "DarkWinzo",
    "github": "@DarkWinzo"
  },
  "result": {
    "title": "Match Title",
    "status": "In Progress",
    "update": "Latest update here",
    "current_score": "Team A: 100/2 (Overs: 10.5)",
    "batsman": "Player 1: 50 (30 balls)",
    "batsman_run": "50",
    "balls_faced": "30",
    "fours": "6",
    "sixes": "2",
    "sr": "166.67",
    "batsman_two": "Player 2: 30 (25 balls)",
    "batsman_two_run": "30",
    "batsman_two_balls_faced": "25",
    "batsman_two_fours": "3",
    "batsman_two_sixes": "1",
    "batsman_two_sr": "120.00",
    "bowler_stats_1": "Bowler 1: 2/40",
    "bowler_over": "4.5",
    "bowler_runs": "40",
    "bowler_wickets": "2",
    "bowler_maiden": "0",
    "bowler_stats_2": "Bowler 2: 1/20",
    "batsman_stats_1": "Batsman 1: 20 (15 balls)",
    "batsman_stats_2": "Batsman 2: 10 (8 balls)",
    "highest_run_scorer": "Player 3: 60",
    "highest_wicket_taker": "Bowler 3: 3/25",
    "partnership": "Current Partnership: 80 runs (10.2 ov)",
    "recent_balls": "Recent balls: WD 4 1 6 2",
    "last_wicket": "Last wicket: Player 4 (Out: LBW, Bowler 4)",
    "currenly_run_rate": "Current Run Rate: 7.69",
    "commentary": "Latest commentary here"
  }
}

Recently Match Details

// Get Recently match details
const { cricket } = require('@darkside-developers/cricket-details');

const upcomingMatches = cricket.upcoming_match();
console.log(upcomingMatches);
{
  "status": true,
  "creator": {
    "name": "DarkWinzo",
    "github": "@DarkWinzo"
  },
  "upcoming": {
    "series": "Upcoming Series",
    "match": [
      {
        "header": "Match Header 1",
        "team_a": "Team A",
        "team_b": "Team B",
        "status": "Upcoming",
        "link": "https://www.cricbuzz.com/upcoming-match1"
      },
      {
        "header": "Match Header 2",
        "team_a": "Team C",
        "team_b": "Team D",
        "status": "Upcoming",
        "link": "https://www.cricbuzz.com/upcoming-match2"
      },
      ...
    ]
  }
}

Cricket Match News

// Get Cricket Matches News
const { cricket } = require('@darkside-developers/cricket-details');

const news = cricket.match_news();
console.log(news);
{
  "status": true,
  "creator": {
    "name": "DarkWinzo",
    "github": "@DarkWinzo"
  },
  "news": [
    {
      "headline": "News 1",
      "image": "https://m.cricbuzz.com/a/img/v1/595x396/news1.jpg",
      "link": "https://m.cricbuzz.com/news1"
    },
    {
      "headline": "News 2",
      "image": "https://m.cricbuzz.com/a/img/v1/595x396/news2.jpg",
      "link": "https://m.cricbuzz.com/news2"
    },
    ...
  ]
}

Feature Match Details

// Get Cricket Feature Matches Details
const { cricket } = require('@darkside-developers/cricket-details');

const featuredMatches = cricket.feature_match();
console.log(featuredMatches);
{
  "status": true,
  "creator": {
    "name": "DarkWinzo",
    "github": "@DarkWinzo"
  },
  "featured": [
    {
      "header": "Match Header 1",
      "team_a": "Team A",
      "team_b": "Team B",
      "status": "In Progress",
      "link": "https://www.cricbuzz.com/feature-match1"
    },
    {
      "header": "Match Header 2",
      "team_a": "Team C",
      "team_b": "Team D",
      "status": "Upcoming",
      "link": "https://www.cricbuzz.com/feature-match2"
    },
    ...
  ]
}

Upcoming Match Details

// Get Cricket Upcoming Matches Details
const { cricket } = require('@darkside-developers/cricket-details');

const upcomingMatches = cricket.upcoming_match();
console.log(upcomingMatches);
{
  "status": true,
  "creator": {
    "name": "DarkWinzo",
    "github": "@DarkWinzo"
  },
  "upcoming": {
    "series": "Upcoming Series",
    "match": [
      {
        "header": "Match Header 1",
        "team_a": "Team A",
        "team_b": "Team B",
        "status": "Upcoming",
        "link": "https://www.cricbuzz.com/upcoming-match1"
      },
      {
        "header": "Match Header 2",
        "team_a": "Team C",
        "team_b": "Team D",
        "status": "Upcoming",
        "link": "https://www.cricbuzz.com/upcoming-match2"
      },
      ...
    ]
  }
}

Author

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to open an issue or create a pull request for any improvements or bug fixes.

Versioning

We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.

Contact

For any questions or feedback, feel free to reach out to the project creator: