html - Using Nokogiri's CSS method to get all names within a team page -
i trying use nokogiri's css method names html.
this example of html:
<section class="container partner-customer padding-bottom--60"> <div> <div> <a id="technologies"></a> <h4 class="center-align">the team</h4> </div> </div> <div class="consultant list-across wrap"> <div class="engineering"> <img class="" src="https://v0001.jpg" alt="person 1"/> <p>person 1<br>founder, chairman & cto</p> </div> <div class="engineering"> <img class="" src="https://v0002.png" alt="person 2"/></a> <p>person 2<br>founder, vp of engineering</p> </div> <div class="product"> <img class="" src="https://v0003.jpg" alt="person 3"/></a> <p>person 3<br>product</p> </div> <div class="human resources & admin"> <img class="" src="https://v0004.jpg" alt="person 4"/></a> <p>person 4<br>people & places</p> </div> <div class="alliances"> <img class="" src="https://v0005.jpg" alt="person 5"/></a> <p>person 5<br>vp of alliances</p> </div>
what have far in people.rake
file following:
staff_site = nokogiri::html(open("https://www.website.com/company/team-all")) all_hands = staff_site.css("").map(&:text).map(&:squish)
i having little trouble getting elements within alt=""
tag (the name of person), nested under few divs. wondering if give me assistance on this?
Comments
Post a Comment