我已经尝试过使用页面源但在页面源中。我想要的 div 标签不存在。
<div class="city-banner autumn livebox globalEvents">
<div class="cloud-3 content">
<div class="cloud-2">
<div class="cloud-1">
<div class="plane-left">
<div class="plane-right">
<div class="city">
<div class="ship left-course">
<div class="yacht">
<div class="precipitation">
<div class="lightning-1"></div>
<div class="lightning-2"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
在浏览 chrom 中的开发工具时,能够找到我需要的 div 并且(在我在调试器中暂停之后)然后我也可以找到我需要的文本。
<div class="bubble" style="margin-left: 537px; margin-top: 63px;"><div class="bubble-inner"><div class="bubble-text"><a href="/profiles.php?XID=1869105" target="_blank">barradell12</a> attacked <a href="/profiles.php?XID=593432" target="_blank">ChaosViper</a></div></div><div class="bubble-tail"></div></div><div class="bubble" style="margin-left: 181px; margin-top: 113px;"><div class="bubble-inner"><div class="bubble-text"><a href="/profiles.php?XID=492053" target="_blank">Nahid7</a> attacked <a href="/profiles.php?XID=1814701" target="_blank">FHC</a></div></div><div class="bubble-tail"></div></div><div class="bubble" style="margin-left: 1183px; margin-top: 7px;"><div class="bubble-inner"><div class="bubble-text">lol</div></div><div class="bubble-tail"></div></div><div class="bubble" style="margin-left: 615px; margin-top: 8px; opacity: 0.684062276342339;"><div class="bubble-inner"><div class="bubble-text"><a href="/profiles.php?XID=1869105" target="_blank">barradell12</a> mugged <a href="/profiles.php?XID=593432" target="_blank">ChaosViper</a></div></div><div class="bubble-tail"></div></div><div class="bubble" style="margin-left: 283px; margin-top: 8px; opacity: 0.561107899969945;"><div class="bubble-inner"><div class="bubble-text">Someone mugged <a href="/profiles.php?XID=1774422" target="_blank">cheesejointsuk</a></div></div><div class="bubble-tail"></div></div><div class="bubble" style="display:none;"><div class="bubble-inner"><div class="bubble-text"><a href="/profiles.php?XID=732076" target="_blank">rexxcii</a> attacked <a href="/profiles.php?XID=1017193" target="_blank">black15</a></div></div><div class="bubble-tail"></div></div><div class="bubble" style="display:none;"><div class="bubble-inner"><div class="bubble-text">Someone hospitalized <a href="/profiles.php?XID=689007" target="_blank">TheWalrus</a></div></div><div class="bubble-tail"></div></div></div>
</div>
现在理想情况下,如果可能的话,我希望将诸如“xxxx 攻击 xxxx”、“xxxxxx 住院 xxxxxx”之类的文本拉到文本文件中。Ps 气泡仅持续几秒钟,然后它们消失并出现更多。所以我都喜欢他们