2.0.2 • Published 8 months ago

opgg-scraper v2.0.2

Weekly downloads
27
License
ISC
Repository
github
Last release
8 months ago

About

A promised based op.gg scraper for League of Legends with a few more data than other packages.

Usage

import opggScraper from 'opgg-scraper';

opggScraper('hide on bush', 'kr').
    then(stats => console.log(stats))       

Parameters

  • username (string): The League of Legends username to retrieve stats for.
  • region (string): The region where the user's account is located (e.g., 'na', 'kr', 'euw', etc.).
  • refresh (boolean): Whether to refresh the data, it's set false by default

Regions

na kr oce jp euw eune lan br las ru tr

// Output
  {
  name: 'hide on bush',
  level: '689',
  profilePic: 'https://opgg-static.akamaized.net/meta/images/profile_icons/profileIcon6.jpg?image=q_auto,f_png,w_auto&v=1693456151155',
  lastMatches: 14,
  wins: 7,
  loses: 7,
  rank: 'Master',
  kda: '7.0 / 4.7 / 5.7',
  previousRank: 'S2023 S1 Master, S2022 Diamond 1, S2021 Master',
  rankedLP: '297 LP',
  winRate: '55%',
  mainChampion: 'Tristana',
  lastTimeOnline: '5 hours ago',
  matches: [
    { teamA: [Array], teamB: [Array], result: 'victory' },
    { teamA: [Array], teamB: [Array], result: 'defeat' },
    { teamA: [Array], teamB: [Array], result: 'defeat' },
    { teamA: [Array], teamB: [Array], result: 'victory' },
    { teamA: [Array], teamB: [Array], result: 'victory' }
  ]
}

Support

If you find this package helpful, consider supporting its development by buying me a coffee:

Buy Me a Coffee

2.0.2

8 months ago

2.0.1

8 months ago

2.0.0

8 months ago

1.1.4

2 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago