title: python BeautifulSoup get all href in Children of div
body: <p>I am new to python and I've been trying to get links and inner text from this html code : </p>
  
  <pre><code>&lt;div class="someclass"&gt;
    &lt;ul class="listing"&gt;
          &lt;li&gt;
            &lt;a href="http://link1.com" title=""&gt;title1&lt;/a&gt;
                  &lt;/li&gt;
          &lt;li&gt;
             &lt;a href="http://link2.com" title=""&gt;title2&lt;/a&gt;
                   &lt;/li&gt;
          &lt;li&gt;
             &lt;a href="http://link3.com" title=""&gt;title3&lt;/a&gt;
                   &lt;/li&gt;
          &lt;li&gt;
             &lt;a href="http://link4.com" title=""&gt;title4&lt;/a&gt;
                    &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want <strong>only and all</strong> links from href <code>http://link.com</code> and the inner text <code>title</code> </p>
  
  <p>i tried this code </p>
  
  <pre><code>    div = soup.find_all('ul',{'class':'listing'})
  for li in div:
      all_li = li.find_all('li')
      for link in all_li.find_all('a'):
          print(link.get('href'))
  </code></pre>
  
  <p>but no luck can someone help me</p>