问题描述
我要使用以下格式的表格抓取网站。
function returnAbsoluteHREFServer(request) {
const protocol = request.protocol;
const fullHostname = request.headers.host;
return absoluteURL;
function absoluteURL(href) {
const URLBase = new URL(`${protocol}://${fullHostname}`);
const newURL = new URL(href,URLBase);
return newURL;
}
}
因此,基本上,为了轻松解析此表,我需要将其分为3行。
我只找到nth-child (用于table.css('tr:nth-child(3n + 1)')中的结果):我可以使用它创建多个结果,然后合并那些可以填充我的商品,但是我希望有一个更好的解决方案。有人可以向我指出正确的方向。我基本上正在寻找类似table.css('tr:n-occurrences(3)')的东西:>
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)