我想抓取这个页面上, 下拉框里面内容的最大的一个数字(就是选择 quantity 那里)。但是这个数字在 html 里面一开始是没有显示的。 在点击下拉按钮之后才会出现需要的内容。

我现在的方法是用 selenium 模拟点击这个按钮然后抓取。 但是速度很慢。
所以考虑用 scrapy 抓取的话, 就比较理想。
我做了如下尝试:
- 我跟了一下 chrome 的 network, 在点击那个按钮的时候没有新的网络内容的加载. 说明这个 quantity 的内容已经加载好了。
- 我在 eventlistener 里面跟了点击事件的处理 js 的函数, 对 js 不是特别的熟悉, 但是看这里似乎没有需要的信息。
var r = function() {
var r = this;
n && k(n) && n.apply(this, arguments);
var o = Array.prototype.slice.call(arguments);
try {
var a = o.map(function(e) {
return Be(e, t)
});
return e.handleEvent ? e.handleEvent.apply(this, a) : e.apply(this, a)
} catch (e) {
throw Fe += 1,
setTimeout(function() {
Fe -= 1
}),
i.withScope(function(n) {
return l(r, void 0, void 0, function() {
var r = this;
return c(this, function(a) {
return n.addEventProcessor(function(e) {
return l(r, void 0, void 0, function() {
var n;
return c(this, function(r) {
return n = s({}, e),
t.mechanism && (n.exception = n.exception || {},
n.exception.mechanism = t.mechanism),
n.extra = s({}, n.extra, {
arguments: V(o, 2)
}),
[2, n]
})
})
}),
i.getCurrentHub().captureException(e, {
originalException: e
}),
[2]
})
})
}),
e
}
};
所以这里求助一下, 我的这个尝试的方向是不是正确下面应该怎么走?