The error I get when I try and do 'update_row' is the following:
AttributeError: 'Worksheet' object has no attribute 'update_row'
Here is my code:
listing = soup.find_all('div', 'result-contain')
for details in listing:
title = details.find('h3')
if not title:
continue
title = title.text.strip()[0:28]
price = details.find('div', 'price')
mileage = details.find_all('li')[0]
just_miles = mileage.text.split()
miles = just_miles[:-1]
adjusted_miles = str(miles)[1:-1]
adjusted_miles = adjusted_miles.replace("'", "")
link = details.find('a')
print(title, price.text, adjusted_miles, link['href'])
index = 2
row = [title,price.text,adjusted_miles,link['href']]
sheet1.insert_row(row,index)
Amy ideas please?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…