Beautiful Soup Another kind of selector is also provided , That's it CSS Selectors . Yes Web Develop familiar readers who believe in CSS Selector must be no stranger . If the CSS Selector not familiar , You can refer to http://www.w3school.com.cn/cssref/css_selectors.ASP Content of page .
Use CSS Selectors need to use Tag Object's select Method , This method receives a string type CSS Selectors . frequently-used CSS Selectors have the following .
The following example uses CSS Selection basis class attribute 、 Node name and id Property to query a specific node .
from bs4 import BeautifulSoup html = ''' <div> <ul> <li class="