
from six.moves.urllib import request


def main():
    opener = request.FancyURLopener()
    opener.addheaders = [('User-Agent', '')]
    opener.retrieve(
        'http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz',
        'tasks_1-20_v1-2.tar.gz')


if __name__ == '__main__':
    main()


from six.moves.urllib import request


def main():
    request.urlretrieve(
        'http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz',
        'tasks_1-20_v1-2.tar.gz')


if __name__ == '__main__':
    main()

Replace deprecated URLopener in `donwload.py`
Replace deprecated URLopener in `donwload.py`

  
  from six.moves.urllib import request
  
  
  def main():
+     request.urlretrieve(
-     opener = request.FancyURLopener()
-     opener.addheaders = [('User-Agent', '')]
-     opener.retrieve(
          'http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz',
          'tasks_1-20_v1-2.tar.gz')
  
  
  if __name__ == '__main__':
      main()
  
Replace deprecated URLopener in `donwload.py`
## Code Before:

from six.moves.urllib import request


def main():
    opener = request.FancyURLopener()
    opener.addheaders = [('User-Agent', '')]
    opener.retrieve(
        'http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz',
        'tasks_1-20_v1-2.tar.gz')


if __name__ == '__main__':
    main()

## Instruction:
Replace deprecated URLopener in `donwload.py`
## Code After:

from six.moves.urllib import request


def main():
    request.urlretrieve(
        'http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz',
        'tasks_1-20_v1-2.tar.gz')


if __name__ == '__main__':
    main()
