Answer the question
In order to leave comments, you need to log in
How to extract link from href?
I am writing a parser in python, I need to extract the link from href using BeautifulSoup so that I can then stuff them into the dictionary
h class="proposition_name"
<a> href="link">Jeep Grand Cherokee 2019a>
Answer the question
In order to leave comments, you need to log in
If html is like this:
<h1 class="proposition_name">
<a href="ссылка">Jeep Grand Cherokee 2019</a>
</h1>
then like this:link = soup.find('h1',class_='proposition_name').a.get('href')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question