<li><a href="https://en.wikipedia.org/wiki/yyyyy.html" title="yyyyy">yyyyyy</a></li>
I am trying to scrape the data and was able to do using the beautifulsoup.
code I am using is :
for ul in soup.findAll('div'):
    print(ul.text)
    for li in ul.findAll('li'):
        print(li.text)
        f.write("li   "+str(li.text))
How can I get the href. I am looking output as: yyyyy;https://en.wikipedia.org/wiki/yyyyy.html
 
     
    