Skip to content

Unit 2: Extracting All Links from a Webpage

In Unit 1 we learned how to extract the first link from a webpage. In this unit we will be writing a program to extract all the links from a given web page. In particular, you will learn three important programming constructs:

  • procedures: (also known in Python as functions), enable you to abstract code from its inputs.
  • if statements: allow you to write code that executes differently depending on the data.
  • while loops: provide a convenient way to repeat the same operations many

You will combine these to solve the problem of finding all of the links on a web page.

Back to top