How do I set an input element to read only with beautiful soup? my element looks like this:
<input id="province" value="BC" />
I know you can create the new attribute in the tag like you would create a new key for a dictionary but this isn't working:
soup.find(id="province")["readonly"]
Solution
soup.find(id="province")["readonly"] = None