Hello All,
Not sure if my post made it up on this forum so I am going to do it one more time to ensure I can get my question answered.
Again, I am using python 3.4.3 and BeautifulSoup4 and when I attempt to use the prettify() code command I get a syntax error as you will specifically see below. Some things of note, however, are that I have used other beautifulsoup commands and I do not incur any syntax errors. For example in doing 'soup.title' and '
soup.title.name', etc, however, I have tried several different approaches and I cannot run the " print(soup.prettify()) " and not get the:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not callable
Again, as you will see below.
>>> import requests
>>> from bs4 import BeautifulSoup
>>>
>> r.content
>>>
>>>NOTE: THIS IS WHERE ALL THE JUMBLED TOGETHER HTML CODE FROM THE PAGE IN THE ABOVE URL REQUEST.GET IS LISTED
>>>
>>> soup = BeautifulSoup(r.content)
>>> print(soup.prettiy())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not callable
>>>
I have been banging my head against a wall for over a week now and really need some help if someone would be so kind :).
Again, I am a newbie to python and beautifulsoup and really want to get past these hurdles.
I cannot thank all of you enough for any assistance relating to this issue I am having.
Drew Loggi