Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Extract the Desired Attribute | Automating Data Collection from Web Sources
Automating Data Collection from Web Sources
course content

Contenuti del Corso

Automating Data Collection from Web Sources

book
Extract the Desired Attribute

For this chapter, we are going to extract some relevant statistics from a web page. In order to do so, you are going to need some kind of knowledge about the structure of the target HTML webpage.

A web page is typically made up of several different types of content, including text, images, and multimedia. These elements are all contained within HTML (HyperText Markup Language) tags, which define the structure and layout of the content on the page.

The basic building blocks of an HTML page are elements, which are represented by tags. These tags are used to mark up the content of the page, indicating to the web browser how it should be displayed. Some common HTML elements include headings, paragraphs, lists, links, and images.

In addition to these core elements, a web page can also include other types of content, such as CSS (Cascading Style Sheets) and JavaScript, which are used to control the appearance and behavior of the page.

Overall, an HTML page is a combination of text, images, and other content, all organized and structured using HTML tags and potentially enhanced with CSS and JavaScript.

Compito

Swipe to start coding

  1. Use the BeautifulSoup library to parse the content of the FAO website.
  2. Get the content of the first div element with the following class: "col-md-4 country".
  3. Get the content of the immediate sibling of the tag we found earlier on.

Soluzione

Mark tasks as Completed
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 4
AVAILABLE TO ULTIMATE ONLY
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt