IndexError: list index out of range while using bs4
<p>This I the Link where I am trying to fetch data  <a href="http://www.flipkart.com/kanika-women-s-nighty/p/itmed2yqzdgqgz3q?pid=NDNED2YQU9HPESEA&amp;al=FvCq1Xh5FyMN11cjuYgL6MldugMWZuE7svdkPtTGUY6%2F3Fk9x0T1uX3Tym%2F%2F6pAalZzKUG0RUT0%3D&amp;ref=L%3A9146140901050108837&amp;srno=p_14&amp;query=nighty&amp;otracker=from-search" rel="nofollow">flipkart</a></p>

<p>and the part of code :</p>

<pre><code>   &lt;div class="toolbar-wrap line section"&gt;
   &lt;div class="ratings-reviews-wrap"&gt;
      &lt;div itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating" class="ratings-reviews line omniture-field"&gt;
         &lt;div class="ratings"&gt;
            &lt;meta itemprop="ratingValue" content="1"&gt;
            &lt;div class="fk-stars" title="1 stars"&gt;
               &lt;span class="unfilled"&gt;★★★★★&lt;/span&gt;
               &lt;span class="rating filled" style="width:20%"&gt;
               ★★★★★
               &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="count"&gt;
               &lt;span itemprop="ratingCount"&gt;2&lt;/span&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>here I have to fetch 1 star from <code>title= 1 star</code> and 2 from <code>&lt;span itemprop="ratingCount"&gt;2&lt;/span&gt;</code></p>

<p>I try the following code</p>

<pre><code> x = link_soup.find_all("div",class_='fk-stars')[0].get('title')

 print x, " product_star"
 y = link_soup.find_all("span",itemprop="ratingCount")[0].string.strip()
 print y
</code></pre>

<p>but It give the </p>

<blockquote>
  <p>IndexError: list index out of range</p>
</blockquote>