Python Web Scraping Cookbook
上QQ阅读APP看书,第一时间看更新

How it works

Beautiful Soup converts the HTML from the page into its own internal representation. This model has an identical representation to the DOM that would be created by a browser. But Beautiful Soup also provides many powerful capabilities for navigating the elements in the DOM, such as what we have seen when using the tag names as properties.  These are great for finding things when we know a fixed path through the HTML with the tag names.