问题标签 [x-ray]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
162 浏览

javascript - 如何使用 X-Ray 和 NodeJs 从 Viadeo 获取数据

所以我正在尝试使用 node.js x 射线抓取框架来抓取一些内容。虽然我可以从单个页面获取内容,但例如仅针对一名员工,我无法弄清楚如何为所有员工获取内容。

工作示例,但将第一个员工还给我:

非常感谢

0 投票
2 回答
89 浏览

javascript - 选择具有相同类名的多个标签?

使用此语法:

网站中有多个具有该特定类名的项目,但它只返回第一个。有没有办法抓住所有这些,也许我可以用那个回报做一个 .limit ?如果它在文档中,我深表歉意,我已经通读了两次,看起来它在任何地方都没有明确说明。

0 投票
1 回答
307 浏览

javascript - html manipulation with Node JS

I want to get html from a source (link or file , ...) and find values from it. html format is :

first of all i used cheerio. according to docs i write:

According to the same procedure i used x-ray and jsdom but all of them print null.

0 投票
1 回答
257 浏览

amazon-web-services - 如何在命令行上将 X-Ray 与 AWS Lambda 函数集成

从控制台,可以通过以下步骤激活 lambda 与 X 射线的集成:从控制台中的函数 > 配置选项卡 > 高级下拉菜单/部分 > 选中启用主动跟踪复选框 > 保存。

我找不到有关如何在命令行中获得上述结果的文档,因此我可以轻松地将其应用于我的所有 lambda,而不是转到控制台中的各个 lambda。

0 投票
1 回答
114 浏览

amazon-web-services - setSegment 意外错误 TypeError:segment.resolveLambdaTraceData 不是函数

我正在尝试最终更改跟踪 ID,因此请告诉我我是否采取了错误的方法。我目前正在考虑的是创建一个段,并将 parent-id 添加为我想要的 trace_id,以便一个跟踪可以跟随另一个跟踪。我尝试这样做的原因是因为 aws x-ray 不支持 aws 的异步部分,例如运动流。

但是,我收到错误:

有什么想法为什么我会收到错误,或者我如何通过连接它们的 trace_id 来连接运动流之前和之后发生的两个事件?

0 投票
3 回答
2715 浏览

javascript - Synchronous Multiple Requests in foor loop with Node js

I'm kind of starting in Javascript and I need help to figure out how can I make this code synchronous while looping through for loop. Basically what I'm doing is making multiple POST requests inside for loops and then im scrapping the data using the library X-Ray and finally I'm saving the result to a Mongo Database. The output is ok but it comes in unordered way and suddenly hangs and I have to force close using ctrl+C. This is my function:

I guess I have to use promises or callbacks but I can't understand how to do this, and I already tried using async await but with no success. If any additional info needs to be provided please tell me, thanks.

0 投票
1 回答
113 浏览

node.js - node js xray从json文件中获取数据

我正在使用 X-Ray 库开发 Node Js 应用程序,我想从 json 文件中获取数据,所以这里是我的代码

这就是我想要做的事情:

那么有没有办法做到这一点?

0 投票
1 回答
205 浏览

javascript - X 射线默认用户代理

我正在开发 Node-Js 应用程序,我正在使用 X-Ray 库和 Request-X-Ray 作为驱动程序,我只想知道默认情况下 X-Ray 使用的是哪个用户代理?

0 投票
1 回答
104 浏览

node.js - X-Ray-Phantom 不兼容的 SockJS 错误

我正在使用 X-Ray 库 X-Ray-Phantom 作为驱动程序开发 Node-Js 应用程序,但出现错误:phantom stdout: Incompatibile SockJS!主站点使用:“0.3.1.7.ga67f.dirty”,iframe:“0.3.4”。这是我的代码:

0 投票
1 回答
219 浏览

node.js - node.js xray中的分页/分页,从当前页面到其他页面

我有一个问题,对于我的学校项目,我需要从宜家的网站上抓取图像,网站的分页部分在这里:

我引用了这个传播,按文本过滤.paginate('.active ' + '.pagination a:contains(pageNumber)@href')但它不起作用。

有什么线索吗?

谢谢!