(python) sgmlparser and how to extract data between tags, not attributes/values
Every example I see for sgmlparser involves finding a tag, then finding the attributes/values of the tag. So for it would be the ability to extract 'google.com' out. but i want the data between tags. so if i used sgmlparser, i would look for and extract out everything in t开发者_运维技巧hat div until it's closing tag. is that the job of sgmlparser, or am i using the wrong library?
Because you mention div's, I gather you want to parse HTML. For doing that your best choice is BeautifulSoup.
精彩评论