Code Monkey home page Code Monkey logo

Comments (1)

CKylinMC avatar CKylinMC commented on June 10, 2024 1

现在允许通过变量直接引用视频信息API所返回的数据。
视频JSON差不多长这样:

view?aid=976673772
{
   "code":0,
   "message":"0",
   "ttl":1,
   "data":{
      "bvid":"BV1Z44y1e7NV",
      "aid":976673772,
      "videos":1,
      "tid":22,
      "tname":"鬼畜调教",
      "copyright":1,
      "pic":"http://i1.hdslb.com/bfs/archive/c44bcd18964b5ba49354e7fe18ba970e1f3dfeb7.jpg",
      "title":"【郭德纲】看法宝看法宝",
      "pubdate":1637147715,
      "ctime":1637147715,
      "desc":"",
      "desc_v2":null,
      "state":0,
      "duration":111,
      "rights":{
         "bp":0,
         "elec":0,
         "download":1,
         "movie":0,
         "pay":0,
         "hd5":0,
         "no_reprint":1,
         "autoplay":1,
         "ugc_pay":0,
         "is_cooperation":0,
         "ugc_pay_preview":0,
         "no_background":0,
         "clean_mode":0,
         "is_stein_gate":0,
         "is_360":0,
         "no_share":0
      },
      "owner":{
         "mid":3294808,
         "name":"耿鬼老师",
         "face":"http://i1.hdslb.com/bfs/face/7ecbdc4464508577ce7ad1f858dfaea8b4973fa0.jpg"
      },
      "stat":{
         "aid":976673772,
         "view":55215,
         "danmaku":92,
         "reply":240,
         "favorite":1201,
         "coin":1729,
         "share":305,
         "now_rank":0,
         "his_rank":0,
         "like":4330,
         "dislike":0,
         "evaluation":"",
         "argue_msg":""
      },
      "dynamic":"",
      "cid":444609808,
      "dimension":{
         "width":1920,
         "height":1080,
         "rotate":0
      },
      "no_cache":false,
      "pages":[
         {
            "cid":444609808,
            "page":1,
            "from":"vupload",
            "part":"看法宝看法宝PV_x264",
            "duration":111,
            "vid":"",
            "weblink":"",
            "dimension":{
               "width":1920,
               "height":1080,
               "rotate":0
            },
            "first_frame":"http://i1.hdslb.com/bfs/storyff/n211118a227j0xkglemqbbk9qognvc2e_firsti.jpg"
         }
      ],
      "subtitle":{
         "allow_submit":false,
         "list":[
            
         ]
      },
      "user_garb":{
         "url_image_ani_cut":""
      },
      "honor_reply":{
         
      }
   }
}

可以在页面加载时按F12然后切换到Network/网络标签页,可以从中找到view?aid=xxxview?bvid=xxx的项目,点击预览即可。

其中data下的任意内容都可以直接作为变量引用。
如:

  • json.data.tname => %tname%
  • json.data.owner.mid => %owner.mid%

这可能导致部分数据和已有部分变量重复,但是不会移除任何已有变量。

这个介绍稍后会贴到脚本介绍中。

from userjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.