I am new to Python. I am using Python 2.7.8 to parse SEC filings. The problem in my code is:
response = urllib2.urlopen('https://www.sec.gov/Archives/edgar/data/1053507/0001193125-11-042904.txt')
HTML = stack.strip_tags(response.read())
Note: strip_tags is defined based on HTMLParser following the following link.
But I got this error "raise HTMLParseError(message, self.getpos()) HTMLParseError: expected name token at '
I used the same code to open other SEC filings and it works fine. I googled, this link seems to be relevant. But even if I tried to replace '!' with "" before invoke strip_tags() and HTMLParseError, it still did not work out. Any idea and suggestion will be very much appreciated.