title: Extract & store links from Beautiful Soup nested objects
body: <p>I'm trying to scrape and save links from a webpage.  The links are organized as widgets in a blogroll section of a blog.  I've figured out how to create a list of some Beautifulsoup objects but can't extract the links from that subset of objects.</p>
  
  <p>I've spent many hours trying various types of find, find_all, and re-souping these objects.</p>
  
  <pre><code>req = Request(url , headers={'User-Agent': 'Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11'})
  document = urlopen(req, context=ctx)
  html = document.read()
  soup = BeautifulSoup(html,"html.parser")
  
  
  
  tags = soup.find_all(attrs={"class":"xoxo blogroll"})
  print(type(tags))
  #this is a &lt;class 'bs4.element.ResultSet'&gt;
  
  
  count = 0
  for tag in tags:
      print(type(tag))
      # this is a &lt;class 'bs4.element.Tag'&gt;
      print('this is tag: ', tag)#tester print
  
   ''' 
      this returns things like:
  this is tag:  &lt;ul class="xoxo blogroll"&gt;
  &lt;li&gt;&lt;a href="http://blog.jaibot.com/"&gt;ANOIEAEIB&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://commonsenseatheism.com/"&gt;Common Sense Atheism&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://lesswrong.com"&gt;Less Wrong&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://thelastpsychiatrist.com/"&gt;The Last Psychiatrist&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;class 'bs4.element.Tag'&gt;
  this is tag:  &lt;ul class="xoxo blogroll"&gt;
  &lt;li&gt;&lt;a href="http://alicorn.elcenia.com/board/index.php"&gt;Alicornutopia&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://unsongbook.com"&gt;Unsong&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="https://parahumans.wordpress.com/"&gt;Worm&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
      '''
  
  </code></pre>
  
  <p>I want to extract and print all the url's from each 'tag' and then save them into my sqlite3 database.</p>