# Wyszukaj linki w danych z URL import urllib.request import re import ssl # Ignoruj błędy związane z certyfikatami SSL ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url = input('Podaj link - ') html = urllib.request.urlopen(url, context=ctx).read() links = re.findall(b'href="(http[s]?://.*?)"', html) for link in links: print(link.decode())