They're not really converted to < and >. All the HTML parsers
treat the contents of a <script> tag as a string, and Beautiful Soup
converts < and > to < and > on *output* so as to keep the HTML
valid. If you look at the content, you'll see the data as it is:
>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup("<script>foo<bar>baz</script>")
>>> soup.script
<script>foo<bar>baz</script>
>>> soup.script.string
u'foo<bar>baz'
If the contents of a <script> tag happen to be HTML markup, you can
parse them by passing the string into a second BeautifulSoup object:
>>> soup2 = BeautifulSoup(soup.script.string)
>>> soup2.bar
<bar>baz</bar>
Leonard