Quantcast
Channel: Empty return when trying to get title attriubute in BeautifulSoup - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Samsul Islam for Empty return when trying to get title attriubute...

Here b is returning li tag with a tag. so to catch the title use b.a then title text.import requestsfrom urllib.request import urlopenfrom bs4 import BeautifulSoupres =...

View Article



Answer by HedgeHog for Empty return when trying to get title attriubute in...

What happens?You grab all the <li> and try to print a title, but <li> do not have a titleIt is the <a> that contains a title, so print:print(b.a["title"])Exampleimport requestsfrom...

View Article

Empty return when trying to get title attriubute in BeautifulSoup

I am trying to get all the names of programming languages from here.import requestsfrom urllib.request import urlopenfrom bs4 import BeautifulSoupres =...

View Article
Browsing all 3 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>