I had been using sbi to do Google search by Image from own webpage, in order to extract the best guess. It has been working well. Yesterday worked well..
Today, when I ran the program, it got errors.
My Code:
import sbi
result = bi.search_by(url='http://weknowyourdreams.com/images/apple/apple-09.jpg')
print result.best_guess
Errors:
File "/Users/Documents/workspace/src/imagesearch.py", line 4, in <module>
result = sbi.search_by(url='http://weknowyourdreams.com/images/apple/apple-09.jpg')
File "/Users/Envs/code1/lib/python2.7/site-packages/sbi.py", line 154, in search_by
url = a['href']
File "/Users/Envs/code1/lib/python2.7/site-packages/bs4/element.py", line 905, in __getitem__
return self.attrs[key]
KeyError: 'href'
Any ideas?
Thanks!
go to sbi.py file, comment out line 129-171.