title: Unequal number of elements when webscraping
body: <p>I want to scrape some car data from autotrader.co.uk. When you search on this site each page contains info for 12 cars. I am scraping separately the price and model which gives me 2 vectors of 12 elements (using rvest). However I can not scrape separately miles, age etc. as they are in a line with other variables and their position for each car might change depending on how many variables are included by seller.
  If you look at the included image the CSS for registration year used for Toyota will give me CAT C for the Ford KA and not the year as this variable is in the second position for this car. So I have to use the CSS for entire line to capture the information. </p>
  
  <p><a href="https://i.stack.imgur.com/HacDv.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/HacDv.jpg" alt="enter image description here"></a></p>
  
  <p>I decided to scrape the entire line (named the resulting vector <code>info</code>). However, this approach gives me a vector of 80+ elements (for each variable such as year, miles etc.). The problem is that I would like to join the model, price and the rest of info in a data frame and I can not do this since the <code>info</code> has more elements than the first two vectors.</p>
  
  <p>The code I used:</p>
  
  <pre><code>URL &lt;- "http://www.autotrader.co.uk/car-search?sort=price-asc&amp;radius=1500&amp;postcode=np198jj&amp;onesearchad=Used&amp;onesearchad=Nearly%20New&amp;onesearchad=New&amp;page="
  link &lt;-read_html(URL)
  price &lt;- html_nodes(link, ".search-result__price") %&gt;%
      html_text()
  info &lt;- html_nodes(link, ".search-result__attributes li") %&gt;%
          html_text()
  </code></pre>
  
  <p>Using <code>xpath</code> for info gives same 80+elements.
  I also tried to concancanate the elements for each car in info, but was not successful:</p>
  
  <pre><code>str_replace_all(info, collapse = "---")
  </code></pre>
  
  <p>So my question is how I can scrape the information on year, miles etc so that these all are one element for each car. Alternativelly maybe there is a possibility to target the year, miles and the rest of variables separatelly. </p>