Learn practical skills, build real-world projects, and advance your career

webscraping

Use the "Run" button to execute the code.

!pip install jovian --upgrade --quiet
import jovian
# Execute this to save new versions of the notebook
jovian.commit(project="webscraping")
[jovian] Updating notebook "akashaktyagi23/webscraping" on https://jovian.ai [jovian] Committed successfully! https://jovian.ai/akashaktyagi23/webscraping
import requests
from bs4 import BeautifulSoup

def get_topics_page():
    # TODO - add comments
    topics_url = 'https://github.com/topics'
    response = requests.get(topics_url)
    if response.status_code != 200:
        raise Exception('Failed to load page {}'.format(topic_url))
    doc = BeautifulSoup(response.text, 'html.parser')
    return doc