python - Getting BeautifulSoup to catch tags in a non-case-sensitive way -
I want to capture some tags with beautifulapps: some & lt; P & gt;
tag, & lt; Title & gt;
tag, some & lt; Meta & gt;
tag but I want to catch them regardless of their case; I know that some sites do meta like this: & lt; Meta & gt;
and I want to be able to catch it.
I saw that Sundersoop is case sensitive by default, how can I catch these tags in a non-case-sensitive manner?
You can use what should match case-insensitive:
< Code> Import beautiful suits html = '' '& lt; Html & gt; & Lt; Top & gt; & Lt; Meta name = "description" content = "free web tutorial on html, css, xml" /> & Lt; Meta name = "keyword" content = "HTML, CSS, XML" /> & Lt; Title & gt; Test & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; / Body & gt;
Result:
& lt; Meta Name = "Details" Content = "Free Web Tutorials on HTML, CSS, XML" /> & lt; Meta name = "keyword" content = "html, css, xml" />
Comments
Post a Comment