作者:IT小样
beautifulsoup 可以从HTML或者XML文件中提取数据。
BeautifulSoup基础引用
html_doc = '''
<html><head><title>hello,tester</title></head><body>
<p class="title"><b><h1>Hello,welcome</h1></b></p>
<p class="documentation">Tester, welcome! This is a new partion of your job's life. With python, you can finnish your work easier and faster.How, <a href="http://example.com/easier" class="easier" id="link1"> easier </a> and <a href="http://example.com/faster" class="faster" id = "link2">faster</a> Now, you have a initial impression about python.</p>
<p class="documention">let's go!!!</p>
</body></html>
'''
上面是一段html代码,可以用这段代码来初步了解BeautifulSoup