title: Targeting <a> with specific attribute using BeautifulSoup
body: <p>I'm attempting to scrape a page that has a section like this:</p>
  
  <pre><code>&lt;a name="id_631"&gt;&lt;/a&gt;
  
  &lt;hr&gt;
  
  &lt;div class="store-class"&gt;
      &lt;div&gt;
          &lt;span&gt;&lt;strong&gt;Store City&lt;/strong&lt;/span&gt;
      &lt;/div&gt;
  
      &lt;div class="store-class-content"&gt;
          &lt;p&gt;Event listing&lt;/p&gt;
          &lt;p&gt;Event listing2&lt;/p&gt;
          &lt;p&gt;Event listing3&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
          Stuff about contact info
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The page is a list of sections like that and the only way to differentiate them is by the name attribute in the <code>&lt;a&gt;</code> tag.</p>
  
  <p>So I'm thinking I want to target that then go to the next_sibling to get the <code>&lt;hr&gt;</code> then again to the next sibling to get the <code>&lt;div class="store-class"&gt;</code> section. All I want is the info in that div tag.</p>
  
  <p>I'm not sure how to target that <code>&lt;a&gt;</code> tag to move down two siblings though. When I try <code>print(soup.find_all('a', {"name":"id_631"}))</code> that just gives me what's in the tag, which is nothing. </p>
  
  <p>Here's my script:</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  r = requests.get("http://www.tandyleather.com/en/leathercraft-classes")
  
  soup = soup = BeautifulSoup(r.text, 'html.parser')
  
  print(soup.find("a", id="id_631").find_next_sibling("div", class_="store-class"))
  </code></pre>
  
  <p>But I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "tandy.py", line 8, in &lt;module&gt;
  print(soup.find("a", id="id_631").find_next_sibling("div", class_="store-class"))
  AttributeError: 'NoneType' object has no attribute 'find_next_sibling'
  </code></pre>