question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help: is soupsieve case-insensitive?

See original GitHub issue
In [122]: xml = """<Envelope><Header>...</Header></Envelope>"""

In [123]: s = BeautifulSoup(xml, "xml")

In [124]: s.select("header")
Out[124]: [<Header>...</Header>]

In [125]: s.select("Header")
Out[125]: []

Before, BeautifulSoup accepted (and I think required) case-sensitive tag name in selector.

Now that BeautifulSoup uses soupsieve, it seems that only lower-case selectors are supported.

I’m really not sure why or if I can change this behaviour.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
facelessusercommented, Jan 23, 2019

1.7.3 has been released. Hopefully that gets where you need to be.

1reaction
facelessusercommented, Jan 23, 2019

@dimaqq, I was testing something that wasn’t on tip. There was indeed a regression. And since I didn’t have a test in place to catch it, I wasn’t aware. I have a fix coming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API - Soup Sieve
Soup Sieve implements most of the selectors from the stable specification and ... The type attribute's value is always case insensitive.
Read more >
Case sensitive :contains()? · Issue #116 - GitHub
This issue will explore the possibility of a case insensitive :contains(). Since we are thinking about expanding :contains() to allow lists, ...
Read more >
Case-insensitive CSS attribute selectors | Can I use... Support ...
Including an i before the ] in a CSS attribute selector causes the attribute value to be matched in an ASCII-case-insensitive manner. For...
Read more >
Parsing issue with recent version (soupsieve exception)
The old selector code was replaced by the third party Soup Sieve library. It aimed to fix the previous select methods poor selection...
Read more >
Parsing an XML document with an HTML parser creates ...
From user point of view, tags are non-casesensitive so there is nothing to loose, BeautifulSoup knows which engine is case sensitive, so why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found