Name 'download_url' is not defined

I’ve had the same experience myself and I solved it by not using the Azure Bing api. Instead, I used duckduckgo api. Here’s the link to my past question. Unfortunately I wasn’t able to fix the issue and couldn’t use the notebook of fastbook lesson 2, even though there were people trying to help me.

Here’s the link for the duckduckgo api tutorial based on the notebook of lesson2 I used. Simply substitute the image downloading part with duckduckgo api and you should be good to go.
https://towardsdatascience.com/classifying-cats-vs-dogs-a-beginners-guide-to-deep-learning-4469ffed086c