BeautifulSoupと組み合わせてスクレイピーをいじり始めたばかりで、非常に明白な何かが欠けているのではないかと思っていますが、結果のスープ オブジェクトから返された html ドキュメントの doctype を取得する方法がわかりません。
次の html があるとします。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta charset=utf-8 />
<meta name="viewport" content="width=620" />
<title>HTML5 Demos and Examples</title>
<link rel="stylesheet" href="/css/html5demos.css" type="text/css" />
<script src="js/h5utils.js"></script>
</head>
<body>
<p id="firstpara" align="center">This is paragraph <b>one</b>
<p id="secondpara" align="blah">This is paragraph <b>two</b>.
</html>
BeautifulSoupを使用して宣言されたdoctypeを抽出する方法があるかどうか誰か教えてもらえますか?