====== Beautiful Soup ====== //Beautiful Soup// ist eine [[python:start|Python]]-[[lexikon:library|Bibliothek]] zum Auslesen von [[html:start|HTML]] und [[xml:start|XML]]. ===== DOCTYPE auslesen ===== def doctype(soup): items = [item for item in soup.contents if isinstance(item, bs4.Doctype)] return items[0] if items else None Quelle: [[https://stackoverflow.com/a/16882069|Stack Overflow: Get Document DOCTYPE With Beauiful Soup]], 2010. ===== Links ===== * [[https://www.crummy.com/software/BeautifulSoup/|Beautiful Soup]]