How to scarpe the href using Nokogiri

I have a variable e which stores a Nokogiri::XML::Element object.

when I execute puts e I get on the screen the following:

<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>

I would like to scrape this part https://www.allrecipes.com/recipe/21712/chocolate-covered-strawberries/

How can I do this using Nokogiri



Read more here: https://stackoverflow.com/questions/64398289/how-to-scarpe-the-href-using-nokogiri

Content Attribution

This content was originally published by ToTheMoon at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: