python - extracting text from tags in html using beautifulsoup -
This is the part of the HTML code that expresses the information that I want to remove from a webpage. Remove the name and the value between the B tags. The result I hope is such a list is: What I tried was: import from b4 What's wrong? FYI, I am starting one, please stand by me. Try [on, DVI, 396,2035,2551]
...
beautiful soup urllib2 url = 'IP address here' html = urllib2 Urlopen (url) .read () soup = beautiful soup (html) main_div = soup.find ("div", {"class": "txt"}) data = main_div.findAll ('b'). Text
data = [main_db for bststring .findAll ('b')]
Comments
Post a Comment