New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

socialblade-com-api

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socialblade-com-api - npm Package Compare versions

Comparing version 2.0.1 to 2.1.1

11

functions.js
const cheerio = require('cheerio')
const validSources = ['twitter', 'instagram', 'facebook'/* , 'youtube' */]
const validSources = ['twitter', 'instagram', 'facebook', 'youtube']

@@ -18,5 +18,8 @@ function isValidSource (source) {

const $ = cheerio.load(data)
// Table for Twitter, Instagram, Facebook
const table = $('#socialblade-user-content > div:nth-child(5)').text().split('\n')
// Charts for Twitter, Instagram
// Table for Twitter, Instagram, Facebook, Youtube
let table = $('#socialblade-user-content > div:nth-child(5)').text().split('\n')
if (source === 'youtube') {
table = $('#socialblade-user-content').text().split(/\s+ESTIMATED EARNINGS\n/)[1].split(/\s+Daily Averages /)[0].split('\n')
}
// Charts for Twitter, Instagram, Youtube
let charts = []

@@ -23,0 +26,0 @@ if (source !== 'facebook') {

{
"name": "socialblade-com-api",
"version": "2.0.1",
"version": "2.1.1",
"description": "Unofficial APIs for Socialblade.com website.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc