from urllib.request import urlopen from bs4 import BeautifulSoup def fun(): quest = 'https://python.org/' url = urlopen(quest).read() soup = BeautifulSoup(url, "html.parser") for links_a in soup.find_all('a'): return links_a.get('href') if __name__ == '__main__': print(fun())
Почему возвращает только одну ссылку а не все со страницы.Подскажите.