[英]Reloading Hulu with Chrome Devtools open causes strange behavior
Background: I'm trying to create a chrome extension for Hulu.背景:我正在尝试为 Hulu 创建一个 chrome 扩展。 For now, all I'm concerned with is grabbing the titles of the movies/shows in the Comedy genre from the DOM.
现在,我所关心的只是从 DOM 中获取喜剧类型的电影/节目的标题。
Prereq to recreate the issue: I feel terrible saying this, but a Hulu subscription.重新创建问题的先决条件:我觉得这很糟糕,但是订阅了 Hulu。 I can't seem to recreate it without logging in.
我似乎无法在不登录的情况下重新创建它。
Steps to recreate the issue:重现问题的步骤:
const showLinks = [...document.getElementsByTagName("a")].filter(x => x.id.includes("title"));
console.log(showLinks);
Any clues on why this is happening would be greatly appreciated.任何关于为什么会发生这种情况的线索将不胜感激。 Any suggestions on a better way to grab all the titles would also be quite welcome!
任何关于获取所有标题的更好方法的建议也将非常受欢迎! Thanks :)
谢谢 :)
Almost immediately realized my folly, the devtools defaulted to a Responsive view which must have fooled Hulu into thinking I was trying to access content through a mobile/tablet device.几乎立即意识到我的愚蠢,devtools 默认为响应式视图,这一定让 Hulu 误以为我正在尝试通过移动/平板设备访问内容。 The error does not occur after switching to a laptop device.
切换到笔记本电脑设备后不会发生该错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.