Apr-25-2024, 10:05 AM
Hello,
In the files I need to work with, I notice that the values in the following meta line can be either lower-case or capitalized.
What would be the right way to convert them to lower-case regardless so that search doesn't miss the others?
In the files I need to work with, I notice that the values in the following meta line can be either lower-case or capitalized.
What would be the right way to convert them to lower-case regardless so that search doesn't miss the others?
#could be "Content-Type" or "content-type" meta = soup.head.find("meta", {"http-equiv":"content-type"}) if meta is None: print("here1") else: print("here2")Thank you.