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

over-parser

v1.1.0

Published

This piece of JS aims to scrap a playoverwatch.com profile page and to produce a JSON digest of the stats found in it for a specific account. When getting a profile's stats, one can choose between regions & game mode, just like on the page itself. The JSO

Downloads

8

Readme

OverScrap

This piece of JS aims to scrap a playoverwatch.com profile page and to produce a JSON digest of the stats found in it for a specific account. When getting a profile's stats, one can choose between regions & game mode, just like on the page itself. The JSON produced is basically a "distraction free" version of what is seen on the page.

Right now, the tool focuses on the Career stats section and can be used for the quickplay & competitive game modes for any region you wish

Originally, I wrote this tool to allow me to track very specific stats (like my K/D ratio) without all the clutter existing applications provide

Note : this is still hugely WIP but, provided it is transpiled, it should be useable on a small app. As Blizzard does not seem to allow cross-origin for playoverwatch.com, this probably means that the requesting will have to be done server-side before handing the parsed data over to a user-facing app.

What does the scrapped data look like?

Here's an example for one character

{
...
  Pharah: 
   { 'Hero Specific': 
      { 'Rocket Direct Hits': '12',
        'Rocket Direct Hits - Most in Game': '12',
        'Rocket Direct Hits - Average': '90.38' },
     Combat: 
      { 'Shots Fired': '27',
        'Shots Hit': '21',
        'Damage Done': '2,287',
        'Weapon Accuracy': '77%' },
     Best: 
      { 'Damage Done - Most in Life': '1,733',
        'Weapon Accuracy - Best in Game': '77%',
        'Damage Done - Most in Game': '2,287',
        'Objective Time - Most in Game': '00:14' },
     Average: 
      { 'Deaths - Average': '7.53',
        'Objective Time - Average': '01:47',
        'Damage Done - Average': '17,224.04' },
     Deaths: { Death: '1', 'Environmental Death': '1' },
     'Match Awards': { 'Medals - Silver': '0', 'Medals - Gold': '0', Medals: '1' },
     Game: 
      { 'Time Played': '1 minute',
        'Games Played': '0',
        'Objective Time': '00:14' },
     Miscellaneous: { 'Games Lost': '0' } },
...
}

The stats collected also include the All heroes section (as seen on the original page).

How do I use it ?

As a lib in a nodejs app

import OverScrap from 'overscrap'

const overscrap = new OverScrap();

overscrap.loadDataFromProfile('Hoshin#2365', 'eu', 'competitive')
.then(playerStats => {
    // from then on, the `playerStats` object contains all heroes data parsed & organized as shown in the previous section
})

Using the cli tool

npm run start <Battle tag> [ region [ game mode ] ]
#^this'll output the raw JSON parsed from the playoverwatch profile page