Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

using bs4 to obtain html element by id

>>> import BeautifulSoup
>>> soup = BeautifulSoup.BeautifulSoup('<html><body><div id="articlebody"> ... </div></body></html')
>>> soup.find("div", {"id": "articlebody"})
<div id="articlebody"> ... </div>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #obtain #html #element #id
ADD COMMENT
Topic
Name
6+1 =