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.
- Using selectorgadget for a single page, scrape the bribe amounts, transactions (during which the bribe was paid) and departments (responsible for the transaction).
- 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.
- Scrape 5 pages using your function.