我有一个这样的代码,我试着在h1中获取数据。这里是'thewire'。但是我得到了h1中的所有文本。在
<h1 id="aiv-content-title" class="js-hide-on-play">
The Wire
<span class="num-of-seasons">5 Seasons</span>
<span class="release-year">2002</span>
</h1>
我得到的输出是Wire5 Seasons2002
当我尝试过这个代码时,我得到了这样的结果
The Wire5 Seasons2002
5 Seasons
2002
我在期待这样的事情
The Wire
5 Seasons
2002
您可以执行以下操作:
我已经找到了解决办法,但有点棘手
这是密码,希望这能帮助一些新生进入这个领域
相关问题 更多 >
编程相关推荐