8000 Update BeautifulSoup solutions · rakash/python-basics-exercises@3732d95 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3732d95

Browse files
committed
Update BeautifulSoup solutions
1 parent 956acd3 commit 3732d95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch15-interacting-with-the-web/2-use-an-html-parser-to-scrape-websites.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
address = base_URL + "/profiles"
1414
html_page = urlopen(address)
1515
html_text = html_page.read().decode("utf-8")
16-
soup = BeautifulSoup(html_text, features="html.parser")
16+
soup = BeautifulSoup(html_text, "html.parser")
1717

1818
# Exercise 2
1919
# Parse out all the values of the page links
@@ -26,5 +26,5 @@
2626
# Display the text in the HTML page of each link
2727
link_page = urlopen(link_address)
2828
link_text = link_page.read().decode("utf-8")
29-
link_soup = BeautifulSoup(link_text, features="html.parser")
29+
link_soup = BeautifulSoup(link_text, s"html.parser")
3030
print(link_soup.get_text())

0 commit comments

Comments
 (0)
0