i created a pyth开发者_StackOverflowon script with the help of BeautifulSoup and i can get some content from a web site.
Now i want with this script to place the code inside the body tag of an html file.
How am i gonna do that ?
thnx
soup = BeautifulSoup(your_old_html)
soup.body.insert(0, your_tag)
print soup
More info here: http://www.crummy.com/software/BeautifulSoup/documentation.html#Adding%20a%20Brand%20New%20Element
精彩评论