5.8 Exercise: Scraping unstructured data

The website www.ipaidabribe.com contains a database of self-reports of bribes in India (apparently now the reports are not edited anymore.. latest posts on selling kidneys). We want to learn how much people were asked to pay for different services, and by which departments.

  1. Using selectorgadget for a single page, scrape the bribe amounts, transactions (during which the bribe was paid) and departments (responsible for the transaction).
  2. First try to extract this information into single objects but subsequently write a function that combines this information and can be applied to an url.
  3. Scrape 5 pages using your function.