【发布时间】:2020-09-12 11:41:42
【问题描述】:
网址: https://www.youtube.com/feed/trending?gl=IN
document.querySelectorAll('a[class="yt-simple-endpoint style-scope yt-formatted-string"]')[0].innerText;
document.querySelectorAll('a[class="yt-simple-endpoint style-scope yt-formatted-string"]')[1].innerText;
问题: 为什么控制台上的 OUTPUT 中有重复项(单击上图)?有人可以解释这里发生了什么吗?如何检索唯一频道名称?
【问题讨论】:
标签: javascript google-chrome youtube selectors-api