title: scrape text by HTML class using BeautifulSoup return null
body: <p>I am trying to get all the comments information from this page(<a href="https://rads.stackoverflow.com/amzn/click/com/1449319246" rel="nofollow noreferrer" rel="nofollow noreferrer">http://www.amazon.com/Learning-Java-Patrick-Niemeyer/dp/1449319246%3FSubscriptionId%3DAKIAIZJQKUHUCXRLH6MQ%26tag%3Dyuplayit-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1449319246</a>), the text inside the tag<code>&lt;div class=“drkgry”&gt;....&lt;/div&gt;</code>but it always shows returns <code>[]</code>. I don’t know what’s happening.</p>
  <p>python:</p>
  <pre><code>import bs4 from BeautifulSoup
  data = open(&quot;example_1.html&quot;).read()
  soup = BeautifulSoup(data)
  soup.find_all(&quot;div&quot;,class=&quot;drkgry&quot;)
  </code></pre>
  <p>I’ve also tried <code>soup.findall(&quot;div&quot;,class=&quot;drkgry&quot;), soup.find_all('div', attrs ={'class':'drkgry'}),</code>but they just doesn't work.</p>
  <p>The data source I want to scrape:</p>
  <pre><code>&lt;/div&gt;  &lt;div class=&quot;txtsmall mt4 fvavp&quot;&gt;&lt;span class=&quot;inlineblock formatVariation&quot;&gt;&lt;span class=&quot;gr3 gry formatKey&quot;&gt;Format:&lt;/span&gt;&lt;span class=&quot;formatValue&quot;&gt;Paperback&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div class=&quot;mt9 reviewText&quot;&gt;
  
  
  
  
  
  
  &lt;div class=&quot;drkgry&quot;&gt;
    Learning Java (Fourth Edition) is book for Java practitioner as reference book. This covers lot of topics.&lt;br&gt;&lt;br&gt;This is an excellent book for someone who knows basics of programming. This book is not beginners. This book lacks examples and exercises which may disappoint few people.&lt;br&gt;&lt;br&gt;Book has 24 chapters covering almost all of basic Java.  The chapter one talks about historical aspects. Second chapter is brief introduction of java but it assumes that reader is aware of programming, OOP, threading etc which is difficult for any beginner.
  &lt;/div&gt;
  
  &lt;/div&gt;  &lt;div class=&quot;clearboth txtsmall gt9 vtStripe&quot;&gt;    &lt;div class=&quot;fl cmt&quot;&gt;
  </code></pre>
  <p>Does anyone help me solve the problem?</p>