This commit is contained in:
Kovid Goyal 2016-04-28 16:17:04 +05:30
parent 0f3c3c85ba
commit d245b747ae

View File

@ -67,6 +67,8 @@ class GoogleImages(Source):
sz = 'isz:l,'
else:
sz = 'isz:lt,islt:%s,' % sz
# See https://www.google.com/advanced_image_search to understand this
# URL scheme
url = 'https://www.google.com/search?as_st=y&tbm=isch&as_q={}&as_epq=&as_oq=&as_eq=&cr=&as_sitesearch=&safe=images&tbs={}iar:t,ift:jpg'.format(q, sz)
log('Search URL: ' + url)
raw = br.open(url).read().decode('utf-8')