You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/academy/webscraping/scraping_basics_python/09_getting_links.md
+83-6Lines changed: 83 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,14 +302,91 @@ Ta-da! We've managed to get links leading to the product pages. In the next less
302
302
303
303
<Exercises />
304
304
305
-
### TODO
305
+
### Scrape links to countries in Africa
306
306
307
-
TODO
307
+
Download Wikipedia's page with the list of African countries, use Beautiful Soup to parse it, and print links to Wikipedia pages of all the states and territories mentioned in all tables. Start with this URL:
Note that some cards contain two links. One leads to the article, and one to the comments. If we selected all the links in the list by `#maincontent ul li a`, we would get incorrect output like this:
0 commit comments