How do i use BS4? (PYTHON
AzureScripts (151)

soup = BeautifulSoup(results_page.content(), 'html.parser')
Is my line of code

Traceback (most recent call last):
File "main.py", line 13, in <module>
soup = BeautifulSoup(results_page.content(), 'html.parser')
TypeError: 'bytes' object is not callable

is the error code

You are viewing a single comment. View All
Answered by 21natzil (892) [earned 5 cycles]
View Answer
Deadly_Venom (0)

results_page <-- is this variable a valid requests object?

AzureScripts (151)

@Deadly_Venom yes.

URL = "https://www.google.com/search?q=" + lyric_query

results_page = requests.get(URL)

Deadly_Venom (0)

@AzureScripts oh wait why r u calling the function, just use result_page.content