【发布时间】:2020-10-17 12:34:49
【问题描述】:
我有一个存储 Nokogiri::XML::Element 对象的变量 e。
当我执行puts e 时,屏幕上会显示以下内容:
<h3 class="fixed-recipe-card__h3">
<a href="https://www.allrecipes.com/recipe/21712/chocolate-covered-strawberries/" data-content-provider-id="" data-internal-referrer-link="hub recipe" class="fixed-recipe-card__title-link">
<span class="fixed-recipe-card__title-link">Chocolate Covered Strawberries</span>
</a>
</h3>
我想刮这部分https://www.allrecipes.com/recipe/21712/chocolate-covered-strawberries/
如何使用 Nokogiri 来做到这一点
【问题讨论】: