title: How to find all next siblings from a particular class using css selectors
body: <p>I want to scrape this website <a href="http://www.hanyc.org/members/hotels/" rel="nofollow noreferrer">Hotel Association Data</a> and need help for the css selector. If you see the below image, I am trying to extract address from here using a css selector.</p>
  
  <p>Data I want to scrape : <code>20 West 29th Street</code> and <code>New York, NY 10001</code></p>
  
  <p><a href="https://i.stack.imgur.com/kDC9v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kDC9v.png" alt="enter image description here"></a></p>
  
  <p><strong>Using Next Sibling Method</strong></p>
  
  <p>I know we can find next sibling using <code>+</code> sign, but the problem here is both the address text doesn't have any <code>attribute</code> associated with it. I don't want to use <code>xpath</code> here but a generic css selector to find all the siblings of <code>.hanyccompany</code> and then extract text from it.</p>
  
  <p>Can anyone tell me how to find all the siblings of <code>class='hanyccompany</code></p>
  
  <pre><code>&lt;span class="hanyccompany"&gt;&lt;a href="http://www.acehotel.com/" target="_blank"&gt;ACE HOTEL NEW YORK&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
  20 West 29th Street&lt;br /&gt;
  New York, NY 10001&lt;br /&gt;
  </code></pre>