简体   繁体   English

这个脚本到底做了什么?

[英]What does this script do exactly?

So I have been trying to understand how https://rblx.trade/catalog/deals (a site that tracks roblox's catalog in real time and communicates changes to the client) communicates with the client.所以我一直试图了解https://rblx.trade/catalog/deals (一个实时跟踪 roblox 目录并将更改传达给客户端的站点)如何与客户端通信。 For this I have been inspecting the site and saw this script which I assume is the one that communicates new data to the client.为此,我一直在检查该站点并看到了这个脚本,我认为它是向客户端传达新数据的脚本。

<script id="__NEXT_DATA__" type="application/json">
                {
                  "props":{
                    "pageProps":{
                      "title":"Roblox Catalog Deals","meta":{"description":"Get the best deals and snipes on Roblox limited items with our deals page! Also turn on notifications to get notified immediately whenever an item gets put up for sale for a cheap price on the Roblox catalog!"}
                      },
                      "__N_SSG":true},
                      "page":"/catalog/deals","query":{},"buildId":"WlqGtyKoC3mZ3T4hTYU5G","runtimeConfig":{
                      "isStaging":false,"api":{"url":"https://rblx.trade","proxyFrontend":false},"sentry":{"dsn":"https://cbbd6a053f7a4d8b8a182804421dddad@sentry.rblxtrade.com/3","tracesSampleRate":0.01}
                      },"isFallback":false,"gsp":true,"scriptLoader":[]
                }
    </script>

The problem is do not know how what it does and how it works as I do not know javascript.问题是不知道它是怎么做的以及它是如何工作的,因为我不知道 javascript。 I searched somewhat how the script type works and what dns means, but thats it.我搜索了一些脚本类型的工作原理以及 dns 的含义,但就是这样。 Any help understanding what this scripts does would be wonderful任何帮助理解这个脚本的作用都会很棒

This is not completely Javascript, as you can see in the type type="application/json" its JSON , JSON is a notation to write objects in javascript. This is not completely Javascript, as you can see in the type type="application/json" its JSON , JSON is a notation to write objects in javascript. The script does not do anything by its own, just define a structure of information.脚本本身不做任何事情,只是定义了一个信息结构。 Probably the logic that uses this information is somewhere else可能使用此信息的逻辑在其他地方

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM