<div class="dots-item"><a href="/index.php?r=crop/harvest&id=12245218"><img alt="Z" height="50" src="https://static/light/crops/gas_station.png" width="50"/></a><a href="/index.php?r=crop/harvest&id=12245218"><img alt="Harvest" class="crop_ico" src="https://static/i/../light/dots/st/dot-st-ready.png"/></a></div>
url = '/index.php?r=crop/harvest&id=12245218'
?divs = [<div class="dots-item"><a href="/index.php?r=crop/harvest&id=12245218"><img alt="z" height="50" src="https://static.hata.mobi/light/crops/gas_station.png" width="50"/></a><a href="/index.php?r=crop/harvest&id=12245218"><img alt="Harvest" class="crop_ico" src="https://static/i/../light/dots/st/dot-st-ready.png"/></a></div>, <div class="dots-item"><a href="/index.php?r=crop/harvest&id=12245219"><img alt='zz"' height="50" src="https://static/light/crops/dining.png" width="50"/></a><a href="/index.php?r=crop/harvest&id=12245219"><img alt="Harvest" class="crop_ico" src="https://static/i/../light/dots/st/dot-st-ready.png"/></a></div>]
divs['href']
#!/usr/bin/env python3
import requests
from bs4 import BeautifulSoup
html = '<div class="dots-item"><a href="/index.php?r=crop/harvest&id=12245218"><img alt="Z" height="50" src="https://static/light/crops/gas_station.png" width="50"/></a><a href="/index.php?r=crop/harvest&id=12245218"><img alt="Harvest" class="crop_ico" src="https://static/i/../light/dots/st/dot-st-ready.png"/></a></div>'
soup = BeautifulSoup(html, 'html.parser')
href = soup.find('div', attrs = {'class':'dots-item'}).find('a').get('href')
print(href)