Scrapy-code doubt

at 5:46 in this video
https://online.codingblocks.com/app/player/209779/content/201830/6017/lecture

the parse function is created outside the loop for url in urls , then how is it still able to access each url and work on it?

what is callback function? what is its role here? what does the line callback= self.parse do?

what is the response parameter in parse function? why are we using response.url instead of url if all we wants is the url to split it and get the number

hey @devchopra999_11c6416ab7f09bbf ,
all this functioning is by default as set in scrapy.

from yeilding in request function from scrapy code , it attaches the callbacks on response for each url we provide and as the callback is provided , hence parse function is called as a result of that .

I hope this helps.