Getting error while downloading images using API

Running this

from fastbook import *
urls = search_images_ddg('grizzly bear', max_images=100)
len(urls),urls[0]

and got this error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-a727f76d86a1> in <module>
      1 from fastbook import *
----> 2 urls = search_images_ddg('grizzly bear', max_images=100)
      3 print(len(urls))

/opt/conda/lib/python3.7/site-packages/fastbook/__init__.py in search_images_ddg(term, max_images)
     55     assert max_images<1000
     56     url = 'https://duckduckgo.com/'
---> 57     res = urlread(url,data={'q':term}).decode()
     58     searchObj = re.search(r'vqd=([\d-]+)\&', res)
     59     assert searchObj

AttributeError: 'str' object has no attribute 'decode' 

Searched it and what I understood was that its already decoded .
saw the source code at https://github.com/fastai/course20/blob/master/fastbook/init.py and its correct there

def search_images_ddg(term, max_images=200):
    "Search for `term` with DuckDuckGo and return a unique urls of about `max_images` images"
    assert max_images<1000
    url = 'https://duckduckgo.com/'
    res = urlread(url,data={'q':term})
    searchObj = re.search(r'vqd=([\d-]+)\&', res)
    assert searchObj
    requestUrl = url + 'i.js'
    params = dict(l='us-en', o='json', q=term, vqd=searchObj.group(1), f=',,,', p='1', v7exp='a')
    urls,data = set(),{'next':1}
    while len(urls)<max_images and 'next' in data:
        try:
            data = urljson(requestUrl,data=params)
            urls.update(L(data['results']).itemgot('image'))
            requestUrl = url + data['next']
        except (URLError,HTTPError): pass
        time.sleep(0.2)
    return L(urls)

So I think I should update my fastbook module in the notebook.checked the version, its already the latest (0.0.16)

How to solve this/ What should I do next?

At present using the whole code with .decode(), but wanted to know how can one change it at /opt/conda/lib/python3.7/site-packages/fastbook/init.py because it’s correct at both https://github.com/fastai/course20/blob/master/fastbook/init.py & https://github.com/fastai/fastbook/blob/master/utils.py