Web Scraping – Řešení [1]
    
    import requests
from bs4 import BeautifulSoup
URL = "https://en.wikipedia.org"
START = "/wiki/Special:Random"
def najdi_titulek(html):
    soup = BeautifulSoup(html, "html.parser")
    return soup.find(id="firstHeading").text
def stahuj(stranka):
    while True:
        odpoved = requests.get(URL + stranka)
        odpoved.raise_for_status()
        print(najdi_titulek(odpoved.text))
        # 3. Vytáhni další odkaz
        break
if __name__ == "__main__":
    stahuj(START)
 
         
        
        
                Toto je stránka lekce z kurzu, který probíhá nebo proběhl naživo s instruktorem.