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

bv2av

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bv2av - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

package.json
{
"name": "bv2av",
"version": "0.2.3",
"version": "0.2.4",
"description": "Convert new bv code of bilibili to old av code",

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

@@ -1,7 +0,7 @@

import axios from 'axios';
const axios = require("axios");
const API = 'https://api.bilibili.com/x/web-interface/view';
const API = "https://api.bilibili.com/x/web-interface/view";
const HEADER = {
'User-Agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36',
"User-Agent":
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
};

@@ -12,3 +12,3 @@

super(msg);
this.name = 'RequestError';
this.name = "RequestError";
this.errorCode = code;

@@ -21,3 +21,3 @@ }

export async function getBvInfo(bv) {
async function getBvInfo(bv) {
const rsp = await axios.get(API, {

@@ -47,5 +47,10 @@ params: {

export async function bv2av(bv) {
async function bv2av(bv) {
const info = await getBvInfo(bv);
return info.avID;
}
module.exports = {
getBvInfo,
bv2av,
};
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