html = '''
<html>
<div class="item">
<div class="quality">SD</div>
<div class="link"><a href>"http://linksd"</div>
<div class="item">
<div class="quality">HD</div>
<div class="link"><a href>"http://linkhd"</div>
<div class="item">
<div class="quality">FullHD</div>
<div class="link"><a href>"http://linkfullhd"</div>
</html>
</tr>
'''
soup = BeautifulSoup(html, 'lxml')
items = soup.find_all('html')
for item in items:
sd = item.find('div', class_='link').get_text()
hd = item.find('div', class_='link').get_text()
fhd = item.find('div', class_='link').get_text()
q = {
'SD': sd,
'HD': hd,
'FullHD': fhd
}
print(q)
{'SD': '"http://linksd"', 'HD': '"http://linksd"', 'FullHD': '"http://linksd"'}
<div class="item">
</div>
и не могу понять как вытаскивать ссылку опираясь на quality