title: Need to scrape a webpage using BeautifulSoup and find data rich nodes especially tables using python
body: <p>I have the following code, but it is giving me an error.</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  url = "http://www.amazon.com/Harry-Potter-And-Chamber-Secrets/dp/0439064872/ref=pd_bxgy_b_img_y"
  r = requests.get(url)
  html = BeautifulSoup(r.content)
  links = html.find("table",{"class":"bucket"}).find_all("h2",{"class":"content"})
  
  print links
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/pgadmin/Google Drive/share sem2/SEMINAR/4.py", line 52, in &lt;module&gt;
      links = html.find("table",{"class":"bucket"}).find_all("h2",{"class":"content"})
  AttributeError: 'NoneType' object has no attribute 'find_all'
  </code></pre>
  
  <p>I am trying to get the data into the bucket class.</p>