Web scraping 在google chrome web inspector中,Div类显示为随机字符串而不是名称

Web scraping 在google chrome web inspector中,Div类显示为随机字符串而不是名称,web-scraping,web-inspector,Web Scraping,Web Inspector,我正在尝试学习一个关于网页抓取()的入门教程,它正在使用《权力的游戏》的reddit页面。在教程中,它说当你检查一篇文章的标题时,它将显示为“ <div class = "top matter"> <p class = "title"> 等,但当我检查标题时,它显示为 <a data-click-id="body" class="SQnoC3ObvgnGjWt90zD9Z" href="/r/gameofthrones/comments/bwc0te/n

我正在尝试学习一个关于网页抓取()的入门教程,它正在使用《权力的游戏》的reddit页面。在教程中,它说当你检查一篇文章的标题时,它将显示为“
<div class = "top matter"> 
<p class = "title"> 

等,但当我检查标题时,它显示为

<a data-click-id="body" class="SQnoC3ObvgnGjWt90zD9Z" href="/r/gameofthrones/comments/bwc0te/no_spoilers_justgiving_fundraiser_for_kit/"><h2 class="yk4f6w-0 lbhQOA">[NO SPOILERS] JustGiving fundraiser for Kit Harington's charity Mencap</h2></a>
<h2 class="yk4f6w-0 lbhQOA">[NO SPOILERS] JustGiving fundraiser for Kit Harington's charity Mencap</h2>

[没有破坏者]只是为Kit Harington的慈善机构Mencap募捐
或者,当我尝试检查计票时:

 <div class="s1h1p2hu-0 fIbDHO"><button class="_2k73nZrjAYiwAj9hv7K-kq" theme="[object Object]" aria-label="upvote" aria-pressed="false" data-click-id="upvote" id="upvote-button-t3_bwc0te" style="background-image: url(&quot;https://styles.redditmedia.com/t5_2rjz2/styles/postUpvoteIconInactive_6fsa07qaj5t01.png&quot;); width: 24px; height: 24px;"></button><div class="_1rZYMD_4xY3gRcSS3p8ODO" style="color: rgb(26, 26, 27);">412</div><button class="ceU_3ot04pOVIcrrXH9fY" theme="[object Object]" aria-label="downvote" aria-pressed="false" data-click-id="downvote" style="background-image: url(&quot;https://styles.redditmedia.com/t5_2rjz2/styles/postDownvoteIconInactive_a6hsvdx3j5t01.png&quot;); width: 24px; height: 24px;"></button></div>
412
我也尝试过在FireFox中打开这个页面,但同样的问题也发生了。所以我知道它不是adblock

我尝试过另一个像Ebay这样的页面,div class/id的标题更具描述性,所以我不确定发生了什么


感谢您的帮助!

自教程首次发布以来,该页面的HTML标记在两年内发生了变化

如果您想继续使用2017年的原始标记,您可以使用Wayback Machine的页面:

下面的屏幕截图显示了教程中解释的预期标记: