【发布时间】:2023-03-04 00:36:01
【问题描述】:
我有这个 google-apps-script 代码,用于获取一些 YT 频道并过滤其中一些:
var popularChannels = YouTube.Channels.list('id, snippet, statistics', {
id: resultsParentChannelIds.slice(i * 50, (i + 1) * 50)
}).getItems().
filter(
ch =>
((channelIdFilter == "" || ch.id == channelIdFilter)
&& (subCountFilter == "" || ch.statistics.subscriberCount > subCountFilter)
&& (channelLocationFilter == "" || channel.snippet.country == undefined || channel.snippet.country == channelLocationFilter)
&& (channelNegativeLocationFilter == "" || channel.snippet.country == undefined || channel.snippet.country != channelNegativeLocationFilter)));
除了最后一个 NegativeLocation 过滤器之外,所有过滤器都是 ""。
但调试器在第一个过滤器之后停止而没有写入任何错误。
如何调试或了解问题所在?
【问题讨论】:
标签: javascript google-apps-script youtube-api filtering