I copied the source code and ran it and get:
for i in range(0, len(symbols):
SyntaxError: invalid syntax.
I was attempting to follow this code, and early on I was getting parser errors. So I installed html5lib and it would give me the error/s:
To get rid of this warning, change this:
BeautifulSoup([your markup], "html5lib")
I looked through the Beautiful Soup documentation and it didn't help much. I changed the
soup = BeautifulSoup(source_code) to
after installing html5lib. But it still gave me the above error in a different format; stopping at the last )) at the end.
So I have 2 questions:
1) Why wouldn't the original source code work?
2) If I install the html5lib parser and change the code as I suggest, what is wrong with it at the end.
In other words, why can't I get this to work. I have seen it partially work; but, in the end, come up with errors after printing out many of the words. I never got to the point where it would count the frequencies of each word though.
Not able to make the original source code work with or without a different parser.
Post a Reply
|Oldest Newest Rating|
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|