title: Error while trying to scrape download links with python
body: <p>I'm trying to scrape all download links from a website. I have a list with  links but i'm getting error.</p>
  
  <p>list is like this:</p>
  
  <pre><code>[&lt;a href='example.com/one'&gt;, &lt;a href='example.com/two'&gt;, &lt;a href='example.com/three'&gt;]
  </code></pre>
  
  <p>when i try to print links only I'm able to do that.</p>
  
  <pre><code>for x in range(len(content)):
      print(content[x])
  </code></pre>
  
  <p>but when i try to execute this it doesn't works.</p>
  
  <pre><code>for x in range(len(content)):
      content[x] = url + content[x]['href']
      v = s.get(content[x], headers=headers)
      content = BeautifulSoup(v.content, 'lxml')
      temp = content.find_all('a', {'class':'download-link'})
      print(temp[2]['href'])
  </code></pre>
  
  <pre><code>  File "app.py", line 31, in &lt;module&gt;
      content[x] = url + content[x]['href']
    File "C:\Users\dead\Anaconda3\lib\site-packages\bs4\element.py", line 1016, in __getitem__
      return self.attrs[key]
  KeyError: 1
  </code></pre>