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

picgo-plugin-bilibili

v1.1.12

Published

bilibili 图床

Downloads

70

Readme

picgo-plugin-bilibili

下载 版本 许可

PicGo 开发的一款插件,新增了B站图床 图床。 使用用户动态的图片上传API。填写SESSDATA和bli_jct即可,获取方式在下面。

目录

  1. 其他推荐
  2. 安装
  3. 获取B站SESSDATA
  4. 图片样式
  5. 解决B站防盗链(403)

其他推荐

安装

  • 在线安装

    打开 PicGo 详细窗口,选择插件设置,搜索bili安装,然后重启应用即可。

  • 离线安装

    克隆该项目,复制项目到 以下目录:

    • Windows: %APPDATA%\picgo\
    • Linux: $XDG_CONFIG_HOME/picgo/ or ~/.config/picgo/
    • macOS: ~/Library/Application\ Support/picgo/

    切换到新目录执行 npm install ./picgo-plugin-bilibili,然后重启应用即可。

获取B站SESSDATA

  1. 登录B站
  2. F12打开控制台
  3. 找到SESSDATA还有bli_jct复制即可

图片样式

例如原图: https://i0.hdslb.com/bfs/album/a18a3f8d666dc19c3216bef39a092e0e60c90eb4.png

规定高宽,质量压缩: https://i0.hdslb.com/bfs/album/a18a3f8d666dc19c3216bef39a092e0e60c90eb4.png@14w_14h_1e_1c

| Type | Url | | ------| --------| | 原图 | baseURL/1.jpg | | 原分辨率,质量压缩 | baseURL/1.jpg@1e_1c.jpg | | 规定宽,高度自适应,质量压缩 | baseURL/1.jpg@104w_1e_1c.jpg | | 规定高,宽度自适应,质量压缩 | baseURL/1.jpg@104h_1e_1c.jpg | | 规定高宽,质量压缩 | baseURL/1.jpg@104w_104h_1e_1c.jpg | | 原分辨率,webp格式(占用最小) | baseURL/1.jpg@104w_104h_1e_1c.webp | | 规定高度,webp格式(占用最小) | baseURL/1.jpg@104w_104h_1e_1c.webp |

格式:(图像原链接)@(\d+[whsepqoc]_?)*(.(|webp|gif|png|jpg|jpeg))?$

  • w:[1, 9223372036854775807] (width,图像宽度)
  • h:[1, 9223372036854775807] (height,图像高度)
  • s:[1, 9223372036854775807] (作用未知)
  • e:[0,2] (resize,0:保留比例取其小,1:保留比例取其大,2:不保留原比例,不与c混用)
  • p:[1,1000] (默认100,放大倍数,不与c混用)
  • q:[1,100] (quality,默认75,图像质量)
  • o:[0,1] (作用未知)
  • c:[0,1] (clip,0:默认,1:裁剪)
  • webp,png,jpeg,gif(不加则保留原格式)
  • 不区分大小写,相同的参数后面覆盖前面
  • 计算后的实际wh不能大于原wh,否则wh参数失效

解决B站防盗链(403)

B站开启了防盗链,利用的是HTTP的Referer属性做判断。如果Referer是他白名单之外的网站,就会返回403

全站图片使用

在html的head标签中设置如下标志,那么全站资源引用都不会携带referrer

<meta name="referrer" content="no-referrer">

新窗口打开

主要设置rel="noreferrer",使用window.open打开的话是会默认携带referrer的,第一次还是会403

<a rel="noreferrer" target="_blank"></a>