Getting BeautifulSoup to catch tags in a non-case-sensitive way?

You can use soup. FindAll which should match case-insensitively: import BeautifulSoup html = ''' Test ''' soup = BeautifulSoup. BeautifulSoup(html) for x in soup.

FindAll('meta'): print x Result: meta name="description" content="Free Web tutorials on HTML, CSS, XML".

You can use soup. FindAll which should match case-insensitively: import BeautifulSoup html = ''' Test ''' soup = BeautifulSoup. BeautifulSoup(html) for x in soup.

FindAll('meta'): print x Result.

– Ram Rachum Jul 28 '10 at 12:14 @cool-RR: Yes find works in a similar way to findAll. The case-sensitivity depends on what you are doing though. – Mark Byers Jul 28 '10 at 12:18 Okay, now I tried and it does convert attributes to lowercase.

– Ram Rachum Jul 28 '10 at 12:36.

BeautifulSoup standardises the parse tree on input. It converts tags to lower-case. You don't have anything to worry about IMO.

I also was not able to reproduce your problem.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions