PHPz2017-04-18 09:36:25
If display:none is specified with style in html, it can be obtained with BeautifulSoup.
print soup1.select( '[style~="display:none"]' )
Documentation: select method used CSS2 selectors: http://www.crummy.com/softwar...
However, the display:none
in the page may also come from CSS rendering, or attributes dynamically added by js. In this case, these elements cannot be obtained using BeautifulSoup alone. You need to use selenium to parse it first, and then use BeautifulSoup to obtain it.