BaşlayınÜcretsiz Başlayın

Titular

Similar to the work given in the previous lesson, we will have you use a pre-loaded Response object, named response to scrape the course titles from the (shortened version of the) DataCamp course directory https://www.datacamp.com/courses/all. To successfully do so, you only need to know the following

  • The course titles are the text from all the h4 elements within the HTML document.

We ask you to extract these course titles here.

Bu egzersiz

Web Scraping in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Using response, assign to the variable crs_title_els a SelectorList of the selected course titles.
  • Assign to the variable crs_titles a list created by extracting the course titles from crs_title_els.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a SelectorList of the course titles
crs_title_els = ____

# Extract the course titles 
crs_titles = ____

# Print out the course titles 
for el in crs_titles:
  print( ">>", el )
Kodu Düzenle ve Çalıştır